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

BinDataType numeric values must be handled as unsigned char

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Run the aggregation framework unit tests under the undefined behavior sanitizer.

      Show
      Run the aggregation framework unit tests under the undefined behavior sanitizer.
    • Sprint:
      Platforms 13 (04/22/16)

      Description

      Value::deserializeForSorter reads a byte from a buffer as a char, which may be signed, and then uses that char to construct a BinDataType value, which is implicitly an int. Since the largest BinDataType value is 128, the value must actually be handled as an unsigned char.

      The same error exists in JParse::binaryObject.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: