Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20003

Coverity analysis defect 73585: Dereference after null check

    • Fully Compatible
    • ALL
    • Security 8 08/28/15

      Pointer is checked against null but then dereferenced anyway

      Defect 73585 (STATIC_C)
      Checker FORWARD_NULL (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp
      Function mongo::<unnamed>::encrypt(__wt_encryptor *, __wt_session *, unsigned char *, unsigned long, unsigned char *, unsigned long, unsigned long *)
      /src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp, line: 145
      Comparing "crypto" to null implies that "crypto" might be null.

                  if (!src || !dst || !resultLen | !crypto | !crypto->symmetricKey) {
      

      /src/mongo/db/modules/enterprise/src/encryptdb/wiredtiger_encryption_callbacks.cpp, line: 145
      Dereferencing null pointer "crypto".

                  if (!src || !dst || !resultLen | !crypto | !crypto->symmetricKey) {
      

            Assignee:
            spencer.jackson@mongodb.com Spencer Jackson
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: