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

Unlikely leak converting corrupt BSON to JSON

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.10.0
    • Affects Version/s: None
    • Component/s: json
    • None

      Leak of memory or pointers to system resources

      Defect 101866 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/bson/bson.c
      Function _bson_as_json_visit_document
      /src/bson/bson.c, line: 3039
      Assigning: "child_state.str" = storage returned from "bson_string_new("{ ")".

                child_state.str = bson_string_new ("{ ");
      

      /src/bson/bson.c, line: 3043
      Variable "child_state" going out of scope leaks the storage "child_state.str" points to.

                   return true;
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: