Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-700

Unchecked error in bson_utf8_escape_for_json

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2-beta0
    • Affects Version/s: 0.90.0
    • Component/s: libbson
    • None

      If bson_utf8_escape_for_json is called with an invalid sequence, e.g. one that begins with 0x80, it doesn't notice that bson_utf8_next_char and bson_utf8_get_char are returning nil. It loops forever on the invalid character, appending the escape sequence for nil, '\u0000', to the output string until it fails to realloc the output buffer and aborts.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: