Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39375

trafficRecordingFileToBSONArr must not close an unopened file

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2019-02-11
    • 0

      The convertTrafficRecordingToBSON function in the shell calls trafficRecordingFileToBSONArr. When called on a non-existant file, this leaves inputFd <0, which causes crashes when ::close is invoked.

      The fix is to move the guard which cleans up the file until after the check that it is valid

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: