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

Coverity analysis defect 98151: Dereference after null check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.5, 3.3.4
    • Component/s: WiredTiger
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:

      Description

      Pointer is checked against null but then dereferenced anyway

      Defect 98151 (STATIC_C)
      Checker FORWARD_NULL (subcategory none)
      File: /src/third_party/wiredtiger/src/btree/bt_cursor.c
      Function __wt_btcur_range_truncate
      /src/third_party/wiredtiger/src/btree/bt_cursor.c, line: 1169
      Comparing "start" to null implies that "start" might be null.

          	cbt = (start != NULL) ? start : stop;

      File: /src/third_party/wiredtiger/src/btree/bt_cursor.c
      Function __wt_btcur_range_truncate
      /src/third_party/wiredtiger/src/btree/bt_cursor.c, line: 1169
      Comparing "start" to null implies that "start" might be null.

          	cbt = (start != NULL) ? start : stop;

      File: /src/third_party/wiredtiger/src/btree/bt_cursor.c
      Function __wt_btcur_range_truncate
      /src/third_party/wiredtiger/src/btree/bt_cursor.c, line: 1169
      Comparing "start" to null implies that "start" might be null.

          	cbt = (start != NULL) ? start : stop;

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: