Coverity analysis defect 73585: Dereference after null check

XMLWordPrintableJSON

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

      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
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: