Throw exception if Binary subtype is out of range

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.1.3
    • Affects Version/s: 1.1.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The BSON specification defines a binary subtype as one byte. Since PHP can only parse it as an integer, we should throw an exception if the argument is out of range (i.e. less than zero or greater than 255).

      Currently, a larger integer will be silently truncated when assigned to an uint8_t in bson_append_binary().

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: