Error: CPPCHECK_WARNING (CWE-476): [#def1] libwacom-2.15.0/libwacom/libwacom-error.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: error # 38| { # 39| WacomError *error = malloc(sizeof(*error)); # 40|-> error->code = WERROR_NONE; # 41| error->msg = NULL; # 42| return error; Error: CPPCHECK_WARNING (CWE-476): [#def2] libwacom-2.15.0/libwacom/libwacom-error.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: error # 39| WacomError *error = malloc(sizeof(*error)); # 40| error->code = WERROR_NONE; # 41|-> error->msg = NULL; # 42| return error; # 43| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] libwacom-2.15.0/redhat-linux-build/../libwacom/libwacom-error.c:40:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘error’ libwacom-2.15.0/redhat-linux-build/../libwacom/libwacom-error.c:39:29: acquire_memory: this call could return NULL libwacom-2.15.0/redhat-linux-build/../libwacom/libwacom-error.c:40:9: danger: ‘error’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 38| { # 39| WacomError *error = malloc(sizeof(*error)); # 40|-> error->code = WERROR_NONE; # 41| error->msg = NULL; # 42| return error;
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-208.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libwacom-2.15.0-1.fc43 |
store-results-to | /tmp/tmpy1ldhdz3/libwacom-2.15.0-1.fc43.tar.xz |
time-created | 2025-04-25 14:12:39 |
time-finished | 2025-04-25 14:13:56 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpy1ldhdz3/libwacom-2.15.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpy1ldhdz3/libwacom-2.15.0-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |