BinDataType numeric values must be handled as unsigned char

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Hide

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

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

      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.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: