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

Crash on empty code string for code_w_s

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      When parsing BSON with a codewscope type we subtract 1 from the code string length. If it is 0 we underflow. (bson-iter.c:1410)

      if (length) {
         memcpy (&len, iter->raw + iter->d2, sizeof (len));
          *length = BSON_UINT32_FROM_LE (len) - 1;
      }
      

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: