Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1561

nil pointer dereference in mongoreplay when error on new playback file creation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 3.4.0-rc3
    • Fix Version/s: 3.4.1, 3.5.2
    • Component/s: mongoreplay
    • Labels:
      None
    • Backport Requested:
      v3.4

      Description

      If there is an error when creating a new playback writer, there is a nil pointer dereference on line 172:
      https://github.com/mongodb/mongo-tools/blob/fd1aa55895cc2ca774bea5ac737177d80b4c7ff3/mongoreplay/record.go#L172

      the defer should be after the error check because arguments to defer are evaluated eagerly.

        Attachments

          Activity

            People

            Assignee:
            gabriel.russell Gabriel Russell
            Reporter:
            rob.clancy@intercom.io Rob Clancy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: