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

Coverity analysis defect 98151: Dereference after null check

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 3.2.5, 3.3.4
    • WiredTiger
    • Fully Compatible
    • ALL

    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

              keith.bostic@mongodb.com Keith Bostic (Inactive)
              xgen-internal-coverity Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: