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

Unlikely leak converting corrupt BSON to JSON

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial - P5 Trivial - P5
    • 1.10.0
    • None
    • json
    • None

    Description

      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;

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: