libevdev-1.13.2-2.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1]
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-names.c: scope_hint: In function ‘type_from_prefix’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-names.c:92:21: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-names.c:92:21: note: read of 3 bytes from after the end of ‘"EV_ABS"’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-names.c:92:21: note: valid subscripts for ‘"EV_ABS"’ are ‘[0]’ to ‘[6]’
#                        └────────────────────────────────────────────────┘
#                           ^      ^      ^       ^             ^
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-names.c:9: included_from: Included from here.
/usr/include/string.h:407:15: note: argument 1 of ‘strlen’ must be a pointer to a null-terminated string
#   90|   		/* skip EV_ prefix so @e is suffix of [EV_]XYZ */
#   91|   		e = &ev_names[i].name[3];
#   92|-> 		l = strlen(e);
#   93|   
#   94|   		/* compare prefix and test for trailing _ */

Error: CPPCHECK_WARNING: [#def2]
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-uinput.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-uinput.c: scope_hint: In function ‘fetch_syspath_and_devnode’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-uinput.c:279:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*uinput_dev.name’ where non-null expected
/usr/include/bits/stat.h:25: included_from: Included from here.
/usr/include/fcntl.h:78: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-uinput.c:9: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-uinput.c:13: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
#  277|   
#  278|   		buf[len - 1] = '\0'; /* file contains \n */
#  279|-> 		if (strcmp(buf, uinput_dev->name) == 0) {
#  280|   			if (uinput_dev->syspath) {
#  281|   				/* FIXME: could descend into bit comparison here */

Error: CPPCHECK_WARNING: [#def4]
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.c: scope_hint: In function ‘init_slots’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.c:361:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/asm/ioctl.h:1: included_from: Included from here.
/usr/include/linux/ioctl.h:5: included_from: Included from here.
/usr/include/asm-generic/ioctls.h:5: included_from: Included from here.
/usr/include/asm/ioctls.h:1: included_from: Included from here.
/usr/include/bits/ioctls.h:23: included_from: Included from here.
/usr/include/sys/ioctl.h:26: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/include/linux/linux/input.h:14: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/include/linux/input.h:2: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.h:33: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:14: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.c:17: included_from: Included from here.
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev.c:1661:29: note: in expansion of macro ‘EVIOCSABS’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:315:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
libevdev-1.13.2-build/libevdev-1.13.2/libevdev/libevdev-int.h:292:17: note: in expansion of macro ‘max_mask’
#  359|   
#  360|   	free_slots(dev);
#  361|-> 	dev->num_slots = abs_info->maximum + 1;
#  362|   	dev->mt_slot_vals = calloc(dev->num_slots * ABS_MT_CNT, sizeof(int));
#  363|   	if (!dev->mt_slot_vals) {

Error: CPPCHECK_WARNING: [#def6]
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c: scope_hint: In function ‘set_abs’
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c:323:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.maximum’
#  321|   		abs.minimum = absinfo->minimum;
#  322|   	if (changes & OPT_MAX)
#  323|-> 		abs.maximum = absinfo->maximum;
#  324|   	if (changes & OPT_FUZZ)
#  325|   		abs.fuzz = absinfo->fuzz;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def8]
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c:325:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.fuzz’
#  323|   		abs.maximum = absinfo->maximum;
#  324|   	if (changes & OPT_FUZZ)
#  325|-> 		abs.fuzz = absinfo->fuzz;
#  326|   	if (changes & OPT_FLAT)
#  327|   		abs.flat = absinfo->flat;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def9]
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c:327:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.flat’
#  325|   		abs.fuzz = absinfo->fuzz;
#  326|   	if (changes & OPT_FLAT)
#  327|-> 		abs.flat = absinfo->flat;
#  328|   	if (changes & OPT_RES)
#  329|   		abs.resolution = absinfo->resolution;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def10]
libevdev-1.13.2-build/libevdev-1.13.2/tools/libevdev-tweak-device.c:329:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*absinfo.resolution’
#  327|   		abs.flat = absinfo->flat;
#  328|   	if (changes & OPT_RES)
#  329|-> 		abs.resolution = absinfo->resolution;
#  330|   
#  331|   	rc = libevdev_kernel_set_abs_info(dev, axis, &abs);

Error: CPPCHECK_WARNING: [#def11]
libevdev-1.13.2-build/libevdev-1.13.2/tools/mouse-dpi-tool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
libevdev-1.13.2-build/libevdev-1.13.2/tools/touchpad-edge-detector.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-180.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibevdev-1.13.2-2.fc41
store-results-to/tmp/tmp9ebmcnb5/libevdev-1.13.2-2.fc41.tar.xz
time-created2024-07-03 14:40:15
time-finished2024-07-03 14:41:06
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9ebmcnb5/libevdev-1.13.2-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp9ebmcnb5/libevdev-1.13.2-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9