Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-593

Throw exception if Binary subtype is out of range

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.3
    • Affects Version/s: 1.1.2
    • Component/s: 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:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: