Crash on empty code string for code_w_s

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: