Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5975

Coverity analysis defect 114097: Dereference after null check

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage - Ra 2020-05-04

      Pointer is checked against null but then dereferenced anyway

      Defect 114097 (STATIC_C)
      Checker FORWARD_NULL (subcategory none)
      File: /src/reconcile/rec_visibility.c
      Function __rec_append_orig_value
      /src/reconcile/rec_visibility.c, line: 79
      Comparing "unpack" to null implies that "unpack" might be null.

                  if (unpack != NULL && unpack->start_ts == upd->start_ts && unpack->start_txn == upd->txnid)
      

      /src/reconcile/rec_visibility.c, line: 107
      Dereferencing null pointer "unpack".

              if (unpack->stop_ts != WT_TS_MAX || unpack->stop_txn != WT_TXN_MAX) {
      

            Assignee:
            chenhao.qu@mongodb.com Chenhao Qu
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: