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

Coverity analysis defect 73585: Dereference after null check

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Security 8 08/28/15

      Description

      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) {
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: