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

Extend NULL check in __wt_config_get

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines
    • 2
    • StorEng - Defined Pipeline

      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:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: