Extend NULL check in __wt_config_get

XMLWordPrintableJSON

    • Storage Engines, Storage Engines - Foundations
    • StorEng - Defined Pipeline
    • 2

      This change is a simple if statement modification:

          if (cfg_arg[0] == NULL)
              return (WT_NOTFOUND);
      

      Becomes:

          if (cfg_arg == NULL || cfg_arg[0] == NULL)
              return (WT_NOTFOUND);
      

      Original coverity information
      Dereference after null check

      Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
      /src/cursor/cur_backup.c:351: FORWARD_NULL 138660 Comparing "cfg" to null implies that "cfg" might be null.

              Assignee:
              [DO NOT USE] Backlog - Storage Engines Team
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: