r->ref in __rec_split_write dereferences NULL field

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines - Transactions
    • None
    • None

      In __rec_split_write() , rec_write.c
      WT_REC_RESULT_SINGLE_PAGE checks r->ref, and we also check r->ref->page->modify. but there's no check that r->ref != NULL

      Dereference of potentially null field

      If the field is actually null, then a null pointer dereference will occur. Field, which is statistically checked against null, is dereferenced.
      /src/reconcile/rec_write.c:2477: NULL_FIELD 184206 Reading field "ref", which is expected to possibly be "NULL" in "r->ref" (checked 2 out of 29 times).
      /src/reconcile/rec_write.c:2477: NULL_FIELD 184206 Dereferencing "r->ref", which is known to be "NULL".

            Assignee:
            Unassigned
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: