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

Coverity analysis defect 76370: Dereference null return (stat)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: None
    • None

      Return value of function, which is statistically inferred to return null, but with no source code available, is dereferenced

      Defect 76370 (STATIC_C)
      Checker NULL_RETURNS (subcategory unimpl)
      File: /src/mongoc/mongoc-stream-tls.c
      Function mongoc_stream_tls_new
      /src/mongoc/mongoc-stream-tls.c, line: 986
      "BIO_new" returns null (checked 2 out of 3 times).

             bio_mongoc_shim = BIO_new (&gMongocStreamTlsRawMethods);
      

      /src/mongoc/mongoc-stream-tls.c, line: 986
      Assigning: "bio_mongoc_shim" = null return value from "BIO_new".

             bio_mongoc_shim = BIO_new (&gMongocStreamTlsRawMethods);
      

      /src/mongoc/mongoc-stream-tls.c, line: 1006
      Dereferencing a null pointer "bio_mongoc_shim".

             bio_mongoc_shim->ptr = tls;
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: