{ "tokens": { "input": 63130, "cache_read": 57672, "cache_write": 2136, "output": 17565 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/b/binutils-gold/binutils-gold_2.44.orig.tar.xz", "main binutils-gold-2.44/bfd/elf-properties.c:247:59: warning: Either the condition 'pr!=NULL' is redundant or there is possible null pointer dereference: bprop. [nullPointerRedundantCheck]\n binutils-gold-2.44/bfd/elf-properties.c:413:14: note: Assuming that condition 'pr!=NULL' is not redundant\n binutils-gold-2.44/bfd/elf-properties.c:406:66: note: Calling function 'elf_merge_gnu_properties', 5th argument 'pr' value is 0\n binutils-gold-2.44/bfd/elf-properties.c:247:59: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 247 only dereferences `bprop` when `aprop` is NULL. At the call site (line 406), `bprop`/`pr` may be NULL, but `aprop` is passed as the address of an object (`&p->property` in the merge loop). So `aprop != NULL` is always true and `bprop->pr_type` is never evaluated. The warning was a false positive. The PR teaches Cppcheck that an object address is true as a bool, which matches this case, so removing the warning is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/createrepo-c/createrepo-c_1.2.1.orig.tar.gz", "your createrepo_c-1.2.1/src/modifyrepo_c.c:217:43: warning:inconclusive: Possible null pointer dereference: metadatapath [nullPointer]\n createrepo_c-1.2.1/src/modifyrepo_c.c:321:35: note: Calling function 'cmd_options_to_task', 3rd argument 'NULL' value is 0\n createrepo_c-1.2.1/src/modifyrepo_c.c:217:43: note: Null pointer dereference" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "Line 321 almost certainly passes NULL as metadatapath only on the `--remove` path, where `options.remove` is set. In that case line 217 is in the else branch and is never reached. Also, `g_debug(\"%s\", NULL)` is only passed through to glib's printf-style formatting; it is not a dereference. The PR now treats `&options` as a known non-null address, so the `!options` early return is resolved as false. That lets the NULL argument flow further, but Cppcheck still does not tie it to `options->remove`, so the new inconclusive warning is a false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/halide/halide_21.0.0.orig.tar.xz", "main halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:415:10: error: Deallocation of an auto-variable (allocations) results in undefined behaviour. [autovarInvalidDeallocation]\n halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:382:30: note: Address of variable taken here.\n halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:383:12: note: Assuming condition is false\n halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:392:9: note: Assuming condition is false\n halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:398:9: note: Assuming condition is true\n halide-21.0.0/src/runtime/hexagon_remote/android/host_malloc.cpp:415:10: note: Deallocating memory that was not dynamically allocated" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`rec` starts as `&allocations`, which is never null, so the `while (rec)` loop always runs at least once. Inside the loop, `rec` is reassigned to `rec->next`. So at the `free(rec)` on line 415, `rec` is a heap record from the list, never the address of the global `allocations`. The removed warning relied on the note 'Assuming condition is false' at line 383, i.e. skipping the loop, which is impossible because the address of an object is non-null. The PR teaches Cppcheck that an object's address used as a bool is true, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/lyx/lyx_2.5.3.orig.tar.xz", "main lyx-2.5.3/src/tests/check_layout.cpp:109:10: error: Deallocation of an auto-variable (cout) results in undefined behaviour. [autovarInvalidDeallocation]\n lyx-2.5.3/src/tests/check_layout.cpp:57:8: note: Address of variable taken here.\n lyx-2.5.3/src/tests/check_layout.cpp:56:13: note: Assuming condition is true\n lyx-2.5.3/src/tests/check_layout.cpp:62:7: note: Assuming condition is false\n lyx-2.5.3/src/tests/check_layout.cpp:108:13: note: Assuming condition is true\n lyx-2.5.3/src/tests/check_layout.cpp:109:10: note: Deallocating memory that was not dynamically allocated" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The notes show `os` is set to `&cout` only when line 56's condition holds, which is presumably `output == \"-\"` (lines 50-66 are not shown). Line 109 deletes `os` only when `output != \"-\"` (line 108). If that reading is right, `&cout` is never deleted and the old warning was a false positive built on contradictory assumptions. The PR teaches Cppcheck that a pointer holding an object's address is non-null when tested as a bool. That changes how the condition at line 62 is evaluated and removes the infeasible path. Removing this false positive is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libf/libfsfat/libfsfat_0~20260208.orig.tar.gz", "main libfsfat-20260208/libcdata/libcdata_array.c:230:4: warning: Possible null pointer dereference: error [nullPointer]\n libfsfat-20260208/libcdata/libcdata_array.c:696:4: note: Calling function 'libcdata_array_free', 3rd argument 'NULL' value is 0\n libfsfat-20260208/libcdata/libcdata_array.c:227:12: note: Assuming condition is true\n libfsfat-20260208/libcdata/libcdata_array.c:230:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 696 passes NULL as `error` and the address of a local or member variable as `array`. Main reached line 230 by assuming `array == NULL` is true, but `array` is an object address and can never be null on that call path. The null dereference of `error` therefore sits on an infeasible path and was a false positive. The PR now treats an object address used as a bool as known true, which removes this false warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libf/libfsfat/libfsfat_0~20260208.orig.tar.gz", "main libfsfat-20260208/libcdata/libcdata_range_list.c:145:4: warning: Possible null pointer dereference: error [nullPointer]\n libfsfat-20260208/libcdata/libcdata_range_list.c:2964:3: note: Calling function 'libcdata_range_list_free', 3rd argument 'NULL' value is 0\n libfsfat-20260208/libcdata/libcdata_range_list.c:142:17: note: Assuming condition is true\n libfsfat-20260208/libcdata/libcdata_range_list.c:145:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Main warned that `error` is dereferenced at line 145, but only on the path where `range_list == NULL`. The call at line 2964 passes NULL for `error`. The removal only makes sense if the first argument there is the address of an object (something like `&list`), which matches what the PR adds. That address can never be NULL, so the `range_list == NULL` branch is unreachable for that call. The PR teaches Cppcheck that an object's address is true when used as a bool, so it drops this infeasible-path false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libf/libfsfat/libfsfat_0~20260208.orig.tar.gz", "main libfsfat-20260208/libcdata/libcdata_tree_node.c:143:4: warning: Possible null pointer dereference: error [nullPointer]\n libfsfat-20260208/libcdata/libcdata_tree_node.c:3161:4: note: Calling function 'libcdata_tree_node_free', 3rd argument 'NULL' value is 0\n libfsfat-20260208/libcdata/libcdata_tree_node.c:140:11: note: Assuming condition is true\n libfsfat-20260208/libcdata/libcdata_tree_node.c:143:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 3161 passes NULL as the 3rd argument (`error`). The first argument is almost certainly the address of a local node variable (`&node`). So inside `libcdata_tree_node_free`, the `node == NULL` branch that passes `error` to `libcerror_error_set` cannot be taken for this call. Main combined the NULL `error` with an assumed-true `node == NULL` condition, which is an infeasible path, so the warning was a false positive. The PR teaches Cppcheck that a pointer holding an object's address is non-null in a boolean context, which removes exactly this kind of false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libf/libfsfat/libfsfat_0~20260208.orig.tar.gz", "main libfsfat-20260208/pyfsfat/pyfsfat_file_object_io_handle.c:220:4: warning: Possible null pointer dereference: error [nullPointer]\n libfsfat-20260208/pyfsfat/pyfsfat_file_object_io_handle.c:202:4: note: Calling function 'pyfsfat_file_object_io_handle_free', 2nd argument 'NULL' value is 0\n libfsfat-20260208/pyfsfat/pyfsfat_file_object_io_handle.c:217:28: note: Assuming condition is true\n libfsfat-20260208/pyfsfat/pyfsfat_file_object_io_handle.c:220:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 200 passes &file_object_io_handle, which is the address of a local variable and so can never be null. The condition `file_object_io_handle == NULL` at line 217 is therefore always false for this call. The NULL error argument only reaches libcerror_error_set on an impossible path, and libcerror_error_set itself handles a NULL error pointer, so the warning was a false positive. The PR makes Cppcheck treat an object address as non-null when used as a bool, which removes it correctly." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libl/liblnk/liblnk_20240423.orig.tar.gz", "main liblnk-20240423/libcdata/libcdata_array.c:230:4: warning: Possible null pointer dereference: error [nullPointer]\n liblnk-20240423/libcdata/libcdata_array.c:696:4: note: Calling function 'libcdata_array_free', 3rd argument 'NULL' value is 0\n liblnk-20240423/libcdata/libcdata_array.c:227:12: note: Assuming condition is true\n liblnk-20240423/libcdata/libcdata_array.c:230:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 696 passes NULL as `error`, but its first argument is the address of a local object (`&array`). That pointer can never be null, so the `array == NULL` branch at line 227 cannot be taken, and `libcerror_error_set(error, ...)` is never reached with a NULL `error`. Main wrongly assumed the condition could be true. The PR now treats a pointer holding an object's address as true in a condition, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libl/liblnk/liblnk_20240423.orig.tar.gz", "main liblnk-20240423/libcdata/libcdata_range_list.c:145:4: warning: Possible null pointer dereference: error [nullPointer]\n liblnk-20240423/libcdata/libcdata_range_list.c:2964:3: note: Calling function 'libcdata_range_list_free', 3rd argument 'NULL' value is 0\n liblnk-20240423/libcdata/libcdata_range_list.c:142:17: note: Assuming condition is true\n liblnk-20240423/libcdata/libcdata_range_list.c:145:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning claimed `error` could be dereferenced as NULL inside the `range_list == NULL` branch of `libcdata_range_list_free`. It was built from the call at line 2964, which passes NULL as `error`. That call passes the address of a local variable (`&var`) as `range_list`, so `range_list == NULL` cannot be true on that path. The PR teaches Cppcheck that a pointer holding an object's address is true in a boolean context, so the impossible branch is no longer assumed. Also, `libcerror_error_set` itself normally checks `error` for NULL. Removing this false positive is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libl/liblnk/liblnk_20240423.orig.tar.gz", "main liblnk-20240423/libcdata/libcdata_tree_node.c:143:4: warning: Possible null pointer dereference: error [nullPointer]\n liblnk-20240423/libcdata/libcdata_tree_node.c:3161:4: note: Calling function 'libcdata_tree_node_free', 3rd argument 'NULL' value is 0\n liblnk-20240423/libcdata/libcdata_tree_node.c:140:11: note: Assuming condition is true\n liblnk-20240423/libcdata/libcdata_tree_node.c:143:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The note says the call at line 3161 passes NULL as the `error` argument. The warning only fires on the path where `node == NULL` is assumed true. That call almost certainly passes the address of a local node pointer as the first argument (something like `&sub_node`), so `node == NULL` cannot be true and the error-reporting branch that uses `error` is unreachable for that call. The PR teaches Cppcheck that a pointer holding an object's address is non-null when used as a condition, which removes this false positive. This is the same pattern as the PR's test case." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libl/liblnk/liblnk_20240423.orig.tar.gz", "main liblnk-20240423/pylnk/pylnk_file_object_io_handle.c:220:4: warning: Possible null pointer dereference: error [nullPointer]\n liblnk-20240423/pylnk/pylnk_file_object_io_handle.c:202:4: note: Calling function 'pylnk_file_object_io_handle_free', 2nd argument 'NULL' value is 0\n liblnk-20240423/pylnk/pylnk_file_object_io_handle.c:217:28: note: Assuming condition is true\n liblnk-20240423/pylnk/pylnk_file_object_io_handle.c:220:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 200 passes `&file_object_io_handle`, the address of a local variable, which can never be null, together with `NULL` for `error`. The check `file_object_io_handle == NULL` at line 217 is therefore always false for this call, so the path that passes the null `error` to `libcerror_error_set` cannot happen. That function also normally accepts a NULL `error` argument. The PR teaches Cppcheck that an object address is true as a condition, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/libcdata/libcdata_array.c:230:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/libcdata/libcdata_array.c:696:4: note: Calling function 'libcdata_array_free', 3rd argument 'NULL' value is 0\n libvslvm-20240504/libcdata/libcdata_array.c:227:12: note: Assuming condition is true\n libvslvm-20240504/libcdata/libcdata_array.c:230:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 696 most likely calls libcdata_array_free(&local, ..., NULL), passing the address of a local as the first argument. That makes `array == NULL` at line 227 impossible, so the path main reported (assume the condition is true, then use the NULL `error` at line 230) cannot happen. In addition, libcerror_error_set normally checks `error` for NULL itself. The PR teaches the program-memory evaluation that a pointer holding an object's address is non-null when used as a bool, so it no longer assumes the infeasible branch. The warning was a false positive, and removing it is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/libcdata/libcdata_range_list.c:145:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/libcdata/libcdata_range_list.c:2964:3: note: Calling function 'libcdata_range_list_free', 3rd argument 'NULL' value is 0\n libvslvm-20240504/libcdata/libcdata_range_list.c:142:17: note: Assuming condition is true\n libvslvm-20240504/libcdata/libcdata_range_list.c:145:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning traces a call at line 2964 that passes NULL as `error`. That call is most likely the clone error path, `libcdata_range_list_free(&destination_range_list, NULL, NULL)`. There the first argument is the address of a local variable, so the `range_list == NULL` branch can never run with that NULL `error`. The PR teaches Cppcheck that an object address is non-null when used as a bool, so it no longer assumes an impossible condition. A false positive is removed." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/libcdata/libcdata_tree_node.c:143:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/libcdata/libcdata_tree_node.c:3161:4: note: Calling function 'libcdata_tree_node_free', 3rd argument 'NULL' value is 0\n libvslvm-20240504/libcdata/libcdata_tree_node.c:140:11: note: Assuming condition is true\n libvslvm-20240504/libcdata/libcdata_tree_node.c:143:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning needs `node == NULL` to be true while `error` is NULL. The call at line 3161 passes NULL as `error`. In libcdata code like this, `node` is normally passed as the address of a local (`&sub_node`), so the `node == NULL` branch cannot run on that path. Main still assumed the condition could be true, which is the false-positive pattern the PR targets: a pointer holding an object address now evaluates to true as a bool. Also, libcerror_error_set itself checks `error` for NULL. Removing this false positive is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/libvslvm/libvslvm_physical_volume.c:196:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/libvslvm/libvslvm_physical_volume.c:1922:4: note: Calling function 'libvslvm_internal_physical_volume_free', 2nd argument 'NULL' value is 0\n libvslvm-20240504/libvslvm/libvslvm_physical_volume.c:193:31: note: Assuming condition is true\n libvslvm-20240504/libvslvm/libvslvm_physical_volume.c:196:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 1922 passes NULL as `error`, but the first argument is the address of an object, so it is never null. That means the check `internal_physical_volume == NULL` at line 193 cannot be true on that call path. The reported dereference of `error` inside that branch therefore cannot happen through this call, so the warning was a false positive. The PR teaches Cppcheck that an object's address is always true as a condition, which removes the warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/pyvslvm/pyvslvm_file_object_io_handle.c:220:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/pyvslvm/pyvslvm_file_object_io_handle.c:202:4: note: Calling function 'pyvslvm_file_object_io_handle_free', 2nd argument 'NULL' value is 0\n libvslvm-20240504/pyvslvm/pyvslvm_file_object_io_handle.c:217:28: note: Assuming condition is true\n libvslvm-20240504/pyvslvm/pyvslvm_file_object_io_handle.c:220:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The call at line 200-202 passes &file_object_io_handle, the address of a local object, so file_object_io_handle in the callee can never be NULL. The condition at line 217 cannot be true on this call path, so the NULL error argument is never used at line 220. Main reported a null dereference along an impossible path. The PR makes a pointer to an object evaluate as true, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libv/libvslvm/libvslvm_20240504.orig.tar.gz", "main libvslvm-20240504/tests/vslvm_test_handle.c:545:4: warning: Possible null pointer dereference: error [nullPointer]\n libvslvm-20240504/tests/vslvm_test_handle.c:1570:4: note: Calling function 'vslvm_test_handle_close_source', 2nd argument 'NULL' value is 0\n libvslvm-20240504/tests/vslvm_test_handle.c:542:13: note: Assuming condition is true\n libvslvm-20240504/tests/vslvm_test_handle.c:545:4: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "At line 1570 the caller passes the address of a local handle (`&handle`) as the first argument and NULL as `error`. Inside `vslvm_test_handle_close_source`, the branch `if( handle == NULL )` therefore cannot be taken, so the reported path that reaches `libcerror_error_set(error, ...)` with a NULL `error` is infeasible. Besides, `libcerror_error_set` tolerates a NULL `error`. The PR teaches Cppcheck that a pointer known to hold the address of an object is true as a bool, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/myspell/myspell_3.0+pre3.1.orig.tar.gz", "main myspell-3.0+pre3.1/hashmgr.cxx:53:14: error: Deallocation of an auto-variable ([) results in undefined behaviour. [autovarInvalidDeallocation]\n myspell-3.0+pre3.1/hashmgr.cxx:42:28: note: Address of variable taken here.\n myspell-3.0+pre3.1/hashmgr.cxx:44:11: note: Assuming condition is false\n myspell-3.0+pre3.1/hashmgr.cxx:51:8: note: Assuming condition is true\n myspell-3.0+pre3.1/hashmgr.cxx:53:14: note: Deallocating memory that was not dynamically allocated" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "At line 42, `pt = &tableptr[i]` points to an element of a heap-allocated table, so it is never null. The `if (pt)` at line 44 is therefore always true, and `pt` is reassigned to `pt->next` before the loop. The removed warning depended on 'Assuming condition is false' at line 44, which cannot happen. It also misnamed the memory as an auto-variable ('['), although `tableptr` is heap memory. The PR now treats an object address as true in a boolean context, which removes this false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/raylib/raylib_6.2+ds.orig.tar.xz", "your raysan5-raylib-0256645/examples/shaders/raygui.h:2193:20: error: Array 'textPtr[15]' accessed at index 9998, which is out of bounds. [arrayIndexOutOfBounds]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "The loop walks the string `textPtr` until it reaches the '\\0' terminator. At that point it sets `exit = 1`, so the loop stops at the end of the string literal passed in, e.g. `textPtr[15]` or `textPtr[8]`. An index of 9998 cannot be reached. The value looks like a loop-iteration limit from simulating the loop, which means the PR's new rule (a pointer to an object counts as true) made Cppcheck lose track of the exit condition. This is a new false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/raylib/raylib_6.2+ds.orig.tar.xz", "your raysan5-raylib-0256645/examples/shaders/raygui.h:2193:20: error: Array 'textPtr[8]' accessed at index 9998, which is out of bounds. [arrayIndexOutOfBounds]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "The loop reads `textPtr[c]` one character at a time. When it reaches the terminating '\\0', it sets `exit = 1`, so it never reads past the end of the string passed in. The index 9998 is invented by Cppcheck: it no longer follows the `exit` flag that stops the loop. The new ProgramMemory rule (treat a pointer to an object as known true) makes the loop condition evaluate wrongly, which produces this new arrayIndexOutOfBounds false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sane-backends/sane-backends_1.4.0.orig.tar.bz2", "your backends-1.4.0/backend/hp3900_rts8822.c:5376:9: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]\n backends-1.4.0/backend/hp3900_rts8822.c:5105:23: note: Assuming that condition 'mt->clampe==-1' is not redundant\n backends-1.4.0/backend/hp3900_rts8822.c:5101:33: note: Calling function 'data_lsb_set', 2nd argument 'mt->clampe' value is -1\n backends-1.4.0/backend/hp3900_rts8822.c:5376:9: note: Shifting a negative value is technically undefined behaviour" ], "verdict": { "verdict": "unclear", "confidence": "low", "explanation": "The new warning is on `data >>= 8` inside `data_lsb_set`, using the value -1 passed from a call at line 5101. That value comes only from 'assuming condition mt->clampe==-1 is not redundant' at line 5105, and lines 5101\u20135105 are not shown, so it cannot be checked whether -1 can really reach the call. The PR makes `address != NULL` known true when `address` is an object address, which is probably what lets the argument value flow into the function body. That part is a correct analysis improvement. However, this is a right shift. Right-shifting a negative value is implementation-defined, not undefined behaviour, and for -1 the byte extraction still gives 0xFF bytes. So the message wording is inaccurate and the practical value of the warning is doubtful. Without the call site, it cannot be decided whether this is a real finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/w/wine/wine_11.0~repack.orig.tar.xz", "main wine-11.0/programs/winedbg/source.c:311:32: warning: Possible null pointer dereference: src2 [nullPointer]\n wine-11.0/programs/winedbg/source.c:372:26: note: Calling function 'source_list', 2nd argument 'NULL' value is 0\n wine-11.0/programs/winedbg/source.c:311:32: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 311 dereferences src2 only after the guard `src1 && src2 && ...` has succeeded, so src2 cannot be null there even when the caller passes NULL. The old warning was a false positive. It most likely came from the call at line 372, which passes the address of an object as src1 and NULL as src2. Main mishandled the short-circuit when src1 was a lifetime/address value. The PR now treats an object address used as a bool as known true, which removes the false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/w/wine/wine_11.0~repack.orig.tar.xz", "your wine-11.0/programs/winefile/winefile.c:307:16: warning: Uninitialized variable: *path [uninitvar]\n wine-11.0/programs/winefile/winefile.c:407:25: note: Calling function 'read_directory', 2nd argument 'buffer' value is \n wine-11.0/programs/winefile/winefile.c:981:27: note: Calling function 'read_directory_win', 2nd argument 'path' value is \n wine-11.0/programs/winefile/winefile.c:307:16: note: Uninitialized variable: *path" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "In `read_directory_win`, `path` is the caller's `buffer`. In wine, the caller (`read_tree_win`) fills `buffer` through the pointer `d = buffer` (`*d++ = *s++; *d++ = '\\\\'; *d = '\\0';`) before calling `read_directory(entry, buffer, ...)`. So `*path` is initialized when line 307 reads it. The PR now treats address-of pointers such as `entry = &root->entry` as known true. That lets Cppcheck follow the `while(entry)` loop body, but it still misses the writes made through `d`. The new uninitvar warning is therefore a false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xwayland/xwayland_24.1.15.orig.tar.xz", "main xwayland-24.1.15/mi/miwideline.c:1452:42: warning: Possible null pointer dereference: rightFace [nullPointer]\n xwayland-24.1.15/mi/miwideline.c:2420:46: note: Calling function 'miLineArc', 6th argument '(LineFacePtr LineFacePtrLineFacePtr)NULL' value is 0\n xwayland-24.1.15/mi/miwideline.c:1451:9: note: Assuming condition is true\n xwayland-24.1.15/mi/miwideline.c:1452:42: note: Null pointer dereference" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The warning at miwideline.c:1452 is reported by both versions; only the call-site note changed from line 2420 to line 2473. In miLineArc, `rightFace` is only dereferenced when `leftFace` is null. The PR teaches Cppcheck that an address-of pointer is true as a bool, which removes the path through the call at 2420, where the 5th argument is most likely an address like `&leftFace`. The same warning is still emitted through a different call that also passes NULL as the 6th argument, and that report is likely still a false positive. Users see the same warning at the same location, so the net effect is essentially unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xwayland/xwayland_24.1.15.orig.tar.xz", "main xwayland-24.1.15/mi/miwideline.c:1453:42: warning: Possible null pointer dereference: rightFace [nullPointer]\n xwayland-24.1.15/mi/miwideline.c:2420:46: note: Calling function 'miLineArc', 6th argument '(LineFacePtr LineFacePtrLineFacePtr)NULL' value is 0\n xwayland-24.1.15/mi/miwideline.c:1451:9: note: Assuming condition is true\n xwayland-24.1.15/mi/miwideline.c:1453:42: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In miLineArc, `rightFace` is only dereferenced when `leftFace` is null (`leftFace ? leftFace->y : rightFace->y`). The removed path comes from the call at line 2420, which passes NULL as the 6th argument (`rightFace`). In xserver's miwideline.c, such calls pass an address like `&leftFace` as the 5th argument, so `leftFace` is non-null and `rightFace` is never dereferenced. The PR teaches Cppcheck that an object's address is true as a bool, so this false-positive path is gone. The same warning is still reported through another call site (line 2473), but this particular removed diagnostic was a false positive. The call-site source was not shown, so confidence is medium." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xwayland/xwayland_24.1.15.orig.tar.xz", "your xwayland-24.1.15/mi/miwideline.c:1452:42: warning: Possible null pointer dereference: rightFace [nullPointer]\n xwayland-24.1.15/mi/miwideline.c:2473:43: note: Calling function 'miLineArc', 6th argument '(LineFacePtr LineFacePtrLineFacePtr)NULL' value is 0\n xwayland-24.1.15/mi/miwideline.c:1451:9: note: Assuming condition is true\n xwayland-24.1.15/mi/miwideline.c:1452:42: note: Null pointer dereference" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "In `miLineArc`, the expression `leftFace ? leftFace->x : rightFace->x` only reads `rightFace` when `leftFace` is null. The xserver callers that pass `(LineFacePtr)NULL` as the 6th argument pass a face address such as `&leftFace` as the 5th argument (from memory of the xserver source; the call sites are not shown here). So `rightFace` is never dereferenced as null, and the warning is a false positive in both versions. The PR teaches Cppcheck that an object address is true, which removed the path through the call at line 2420. The same warning is still reported at the same lines, now through the call at line 2473. The false positive remains, only its note points to a different call site, so users see no real change." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xwayland/xwayland_24.1.15.orig.tar.xz", "your xwayland-24.1.15/mi/miwideline.c:1453:42: warning: Possible null pointer dereference: rightFace [nullPointer]\n xwayland-24.1.15/mi/miwideline.c:2473:43: note: Calling function 'miLineArc', 6th argument '(LineFacePtr LineFacePtrLineFacePtr)NULL' value is 0\n xwayland-24.1.15/mi/miwideline.c:1451:9: note: Assuming condition is true\n xwayland-24.1.15/mi/miwideline.c:1453:42: note: Null pointer dereference" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "In `miLineArc`, `rightFace` is only dereferenced when `leftFace` is NULL (`leftFace ? leftFace->y : rightFace->y`). The call sites that pass NULL as the 6th argument most likely pass the address of a local face struct as the 5th argument. That address can never be null, so the warning is a false positive both before and after the PR. The PR taught Cppcheck that an object address is true in a condition. That removed the path through the call at line 2420. The same false positive is still reported at the same line, now traced through the call at line 2473. For users this is the same false positive with a different note, so nothing changes in practice." } } ], "started": "2026-11-27 15:15:02 UTC", "runner": "aws-testrunner-3" }