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

Use safeNumberLong() to parse wTimeout from command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2020-01-27, Repl 2020-02-10
    • Linked BF Score:
      95

      Description

      We currently parse the wTimeout field of a writeConcern object using numberInt(). However, the documentation for numberInt() states that we will get undefined behavior for cases like when given a double too large/small to be expressed as an int or a double that is NaN. The documentation suggests using safeNumberLong() instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jason.chan Jason Chan
              Reporter:
              jason.chan Jason Chan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: