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

Unchecked error in bson_utf8_escape_for_json

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.90.0
    • Fix Version/s: 1.2-beta0
    • Component/s: libbson
    • Labels:
      None
    • Story Points:
      4
    • Sprint:
      C Driver 2015Q2 sprint 3

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: