libwacom-2.17.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libwacom-2.17.0/libwacom/libwacom-database.c:1462:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(datadir)’
libwacom-2.17.0/libwacom/libwacom-database.c:1546:1: enter_function: entry to ‘libwacom_database_new_for_path’
libwacom-2.17.0/libwacom/libwacom-database.c:1552:14: call_function: calling ‘database_new_for_paths’ from ‘libwacom_database_new_for_path’
# 1460|   		return errno == ENOENT; /* non-existing directory is ok */
# 1461|   
# 1462|-> 	while ((file = readdir(dir))) {
# 1463|   		g_autofree char *path = NULL;
# 1464|   

Error: CPPCHECK_WARNING (CWE-476): [#def2]
libwacom-2.17.0/libwacom/libwacom-error.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: error
#   39|   {
#   40|   	WacomError *error = malloc(sizeof(*error));
#   41|-> 	error->code = WERROR_NONE;
#   42|   	error->msg = NULL;
#   43|   	return error;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libwacom-2.17.0/libwacom/libwacom-error.c:41:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘error’
libwacom-2.17.0/libwacom/libwacom-error.c:40:29: acquire_memory: this call could return NULL
libwacom-2.17.0/libwacom/libwacom-error.c:41:9: danger: ‘error’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   39|   {
#   40|   	WacomError *error = malloc(sizeof(*error));
#   41|-> 	error->code = WERROR_NONE;
#   42|   	error->msg = NULL;
#   43|   	return error;

Error: CPPCHECK_WARNING (CWE-476): [#def4]
libwacom-2.17.0/libwacom/libwacom-error.c:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: error
#   40|   	WacomError *error = malloc(sizeof(*error));
#   41|   	error->code = WERROR_NONE;
#   42|-> 	error->msg = NULL;
#   43|   	return error;
#   44|   }

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-171.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibwacom-2.17.0-1.fc44
store-results-to/tmp/tmpsa4h9onk/libwacom-2.17.0-1.fc44.tar.xz
time-created2026-01-08 19:17:30
time-finished2026-01-08 19:18:53
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpsa4h9onk/libwacom-2.17.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsa4h9onk/libwacom-2.17.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9