upower-1.90.4-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
upower-1.90.4-build/upower-v1.90.4/libupower-glib/up-device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
upower-1.90.4-build/upower-v1.90.4/libupower-glib/up-types.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/UPower-scan.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def4]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/UPower-scan.c:188:16: warning[deadcode.DeadStores]: Although the value stored to 'event_num' is used in the enclosing expression, the value is never actually read from 'event_num'

Error: CPPCHECK_WARNING: [#def5]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/dbus/up-daemon-generated.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/dbus/up-device-generated.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/dbus/up-kbd-backlight-generated.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def8]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/tmp-introspectjcka10es/UPowerGlib-1.0.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def9]
upower-1.90.4-build/upower-v1.90.4/redhat-linux-build/tmp-introspectjcka10es/UPowerGlib-1.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')

Error: CPPCHECK_WARNING: [#def10]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-backend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-hid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-hid.c: scope_hint: In function ‘up_device_hid_coldplug’
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-hid.c:301:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_udev_device_get_device_file(up_device_get_native(device)), 2048)’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-hid.c:29: included_from: Included from here.
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-hid.c:299:17: note: in expansion of macro ‘g_debug’
#  299|   		g_debug ("using device: %s", device_file);
#  300|   		hid->priv->fd = open (device_file, O_RDONLY | O_NONBLOCK);
#  301|-> 		if (hid->priv->fd < 0) {
#  302|   			g_debug ("cannot open device file %s", device_file);
#  303|   			goto out;

Error: CPPCHECK_WARNING: [#def13]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-supply.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-wup.c: scope_hint: In function ‘up_device_wup_coldplug’
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-wup.c:299:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_udev_device_get_device_file(up_device_get_native(device)), 2050)’
#  297|   
#  298|   	/* connect to the device */
#  299|-> 	wup->priv->fd = open (device_file, O_RDWR | O_NONBLOCK);
#  300|   	if (wup->priv->fd < 0) {
#  301|   		g_debug ("cannot open device file %s", device_file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-device-wup.c:300:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_udev_device_get_device_file(up_device_get_native(device)), 2050)’
#  298|   	/* connect to the device */
#  299|   	wup->priv->fd = open (device_file, O_RDWR | O_NONBLOCK);
#  300|-> 	if (wup->priv->fd < 0) {
#  301|   		g_debug ("cannot open device file %s", device_file);
#  302|   		goto out;

Error: CPPCHECK_WARNING: [#def16]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-enumerator-udev.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-121): [#def17]
upower-1.90.4-build/upower-v1.90.4/src/linux/up-input.c: scope_hint: In function ‘up_input_str_to_bitmask’
upower-1.90.4-build/upower-v1.90.4/src/linux/up-input.c:103:28: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
upower-1.90.4-build/upower-v1.90.4/src/linux/up-input.c:103:28: note: write of 8 bytes to beyond the end of ‘bitmask’
upower-1.90.4-build/upower-v1.90.4/src/linux/up-input.c:103:28: note: valid subscripts for ‘bitmask’ are ‘[0]’ to ‘[0]’
#  101|   
#  102|   		val = strtoul (v[i], NULL, 16);
#  103|-> 		bitmask[j] = val;
#  104|   
#  105|   		while (val != 0) {

Error: CPPCHECK_WARNING: [#def18]
upower-1.90.4-build/upower-v1.90.4/src/up-common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
upower-1.90.4-build/upower-v1.90.4/src/up-daemon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def20]
upower-1.90.4-build/upower-v1.90.4/src/up-device-battery.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def21]
upower-1.90.4-build/upower-v1.90.4/src/up-device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def22]
upower-1.90.4-build/upower-v1.90.4/src/up-history.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
upower-1.90.4-build/upower-v1.90.4/src/up-kbd-backlight.c: scope_hint: In function ‘up_kbd_backlight_find’
upower-1.90.4-build/upower-v1.90.4/src/up-kbd-backlight.c:295:75: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(dir_path, "brightness", 0), 2)’
#  293|   
#  294|   	/* read brightness and check if it has an acceptable value */
#  295|-> 	if (up_kbd_backlight_brightness_read (kbd_backlight, kbd_backlight->priv->fd) < 0)
#  296|   		goto out;
#  297|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
upower-1.90.4-build/upower-v1.90.4/src/up-kbd-backlight.c:300:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(dir_path, "brightness_hw_changed", 0), 0)’
#  298|   	path_hw_changed = g_build_filename (dir_path, "brightness_hw_changed", NULL);
#  299|   	kbd_backlight->priv->fd_hw_changed = open (path_hw_changed, O_RDONLY);
#  300|-> 	if (kbd_backlight->priv->fd_hw_changed >= 0) {
#  301|   		kbd_backlight->priv->channel_hw_changed = g_io_channel_unix_new (kbd_backlight->priv->fd_hw_changed);
#  302|   		g_io_add_watch (kbd_backlight->priv->channel_hw_changed,

Error: CPPCHECK_WARNING: [#def25]
upower-1.90.4-build/upower-v1.90.4/src/up-main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
upower-1.90.4-build/upower-v1.90.4/src/up-self-test.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-84.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameupower-1.90.4-2.fc41
store-results-to/tmp/tmprqcia9_2/upower-1.90.4-2.fc41.tar.xz
time-created2024-07-03 18:12:04
time-finished2024-07-03 18:13:19
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmprqcia9_2/upower-1.90.4-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmprqcia9_2/upower-1.90.4-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9