Fix use-after-move in buildMultiPlan

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Query 2020-08-24
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This code can result in a nullptr dereference, depending on the order that the parameters to buildExecutableTree are evaluated.

      buildExecutableTree(*solutions[ix], true), std::move(solutions[ix])
      

      https://github.com/mongodb/mongo/blob/e908bb6b444235cb251c4e69b5adac9e6a983953/src/mongo/db/query/get_executor.cpp#L945

            Assignee:
            Justin Seyster
            Reporter:
            Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: