fwupd-2.0.8-2.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5718:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5681:1: enter_function: entry to ‘fwupd_client_download_http_retry’
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5686:27: release_memory: ‘error_monitor’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5692:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5694:64: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5695:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5697:14: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5697:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5708:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5710:24: call_function: calling ‘fwupd_client_download_http’ from ‘fwupd_client_download_http_retry’
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5710:24: return_function: returning to ‘fwupd_client_download_http_retry’ from ‘fwupd_client_download_http’
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5711:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5713:26: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5713:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5714:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5714:21: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5713:21: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5718:17: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5718:17: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupd/fwupd-client.c:5718:17: danger: dereference of NULL ‘error_local’
# 5716|   			break;
# 5717|   		}
# 5718|-> 		g_debug("ignoring and trying again: %s", error_local->message);
# 5719|   		g_usleep(delay_ms * 1000);
# 5720|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:480:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:364:1: enter_function: entry to ‘fu_backend_from_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:376:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:380:14: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:380:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:387:23: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:390:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:395:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:406:26: call_function: calling ‘fu_backend_get_devices’ from ‘fu_backend_from_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:406:26: return_function: returning to ‘fu_backend_from_json’ from ‘fu_backend_get_devices’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-backend.c:480:31: danger: dereference of NULL ‘fu_backend_get_devices(codec)’
#  478|   
#  479|   	/* emit removes then adds */
#  480|-> 	for (guint i = 0; i < devices_remove->len; i++) {
#  481|   		FuDevice *device = g_ptr_array_index(devices_remove, i);
#  482|   		if (!fu_device_has_flag(device, FWUPD_DEVICE_FLAG_EMULATED))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:427:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:375:1: enter_function: entry to ‘fu_bios_settings_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:381:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:383:13: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:395:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:403:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:405:24: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:411:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:418:43: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:419:28: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:421:37: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:422:30: call_function: calling ‘fu_bios_settings_populate_attribute’ from ‘fu_bios_settings_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:422:30: return_function: returning to ‘fu_bios_settings_setup’ from ‘fu_bios_settings_populate_attribute’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:422:28: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:427:33: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:427:33: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-bios-settings.c:427:33: danger: dereference of NULL ‘error_local’
#  425|   								 name,
#  426|   								 &error_local)) {
#  427|-> 				g_debug("%s is not supported: %s", name, error_local->message);
#  428|   				continue;
#  429|   			}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1133:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1076:1: enter_function: entry to ‘fu_context_load_hwinfo’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1097:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1098:9: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1109:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1113:27: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1114:30: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1124:9: call_function: calling ‘fu_context_add_flag’ from ‘fu_context_load_hwinfo’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1124:9: return_function: returning to ‘fu_context_load_hwinfo’ from ‘fu_context_add_flag’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1132:17: call_function: calling ‘fu_context_get_hwid_guids’ from ‘fu_context_load_hwinfo’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1132:17: return_function: returning to ‘fu_context_load_hwinfo’ from ‘fu_context_get_hwid_guids’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-context.c:1133:31: danger: dereference of NULL ‘fu_context_get_hwid_guids(self)’
# 1131|   	/* set the hwid flags */
# 1132|   	guids = fu_context_get_hwid_guids(self);
# 1133|-> 	for (guint i = 0; i < guids->len; i++) {
# 1134|   		const gchar *guid = g_ptr_array_index(guids, i);
# 1135|   		fu_context_lookup_quirk_by_id_iter(self,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2600:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_all’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2562:1: enter_function: entry to ‘fu_firmware_new_from_gtypes’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2570:27: release_memory: ‘error_all’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2572:9: branch_false: following ‘false’ branch (when ‘stream’ is non-NULL)...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2572:9: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2586:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2595:27: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2596:31: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2598:35: release_memory: ‘error_all’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2599:22: call_function: calling ‘fu_firmware_parse_stream’ from ‘fu_firmware_new_from_gtypes’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2599:22: return_function: returning to ‘fu_firmware_new_from_gtypes’ from ‘fu_firmware_parse_stream’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2599:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2600:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2600:25: release_memory: ‘error_all’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-firmware.c:2600:25: danger: dereference of NULL ‘error_local’
# 2598|   		g_autoptr(GError) error_local = NULL;
# 2599|   		if (!fu_firmware_parse_stream(firmware, stream, offset, flags, &error_local)) {
# 2600|-> 			g_debug("%s", error_local->message);
# 2601|   			if (error_all == NULL) {
# 2602|   				g_propagate_error(&error_all, g_steal_pointer(&error_local));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:391:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:375:1: enter_function: entry to ‘fu_hwids_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:377:38: call_function: calling ‘fu_hwids_get_chid_keys’ from ‘fu_hwids_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:377:38: return_function: returning to ‘fu_hwids_setup’ from ‘fu_hwids_get_chid_keys’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:379:9: call_function: calling ‘FU_IS_HWIDS’ from ‘fu_hwids_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:379:9: return_function: returning to ‘fu_hwids_setup’ from ‘FU_IS_HWIDS’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:379:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:380:9: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:383:27: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:384:36: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:386:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:386:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:386:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:389:24: call_function: calling ‘fu_hwids_get_guid’ from ‘fu_hwids_setup’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:389:24: return_function: returning to ‘fu_hwids_setup’ from ‘fu_hwids_get_guid’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:390:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:391:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:391:25: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-hwids.c:391:25: danger: dereference of NULL ‘error_local’
#  389|   		guid = fu_hwids_get_guid(self, key, &error_local);
#  390|   		if (guid == NULL) {
#  391|-> 			g_debug("%s is not available, %s", key, error_local->message);
#  392|   			continue;
#  393|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:258:76: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘event_id’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:243:28: release_memory: ‘event_id’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:246:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:247:65: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:246:13: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:257:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:257:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:258:84: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:258:84: release_memory: ‘event_id’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:258:76: danger: dereference of NULL ‘event_id’
#  256|   	/* emulated */
#  257|   	if (fu_device_has_flag(FU_DEVICE(self->udev_device), FWUPD_DEVICE_FLAG_EMULATED)) {
#  258|-> 		event = fu_device_load_event(FU_DEVICE(self->udev_device), event_id->str, error);
#  259|   		if (event == NULL)
#  260|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:289:76: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘event_id’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:243:28: release_memory: ‘event_id’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:246:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:247:65: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:246:13: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:257:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:257:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:287:65: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:287:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:289:84: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:289:84: release_memory: ‘event_id’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-ioctl.c:289:76: danger: dereference of NULL ‘event_id’
#  287|   	if (fu_context_has_flag(fu_device_get_context(FU_DEVICE(self->udev_device)),
#  288|   				FU_CONTEXT_FLAG_SAVE_EVENTS)) {
#  289|-> 		event = fu_device_save_event(FU_DEVICE(self->udev_device), event_id->str);
#  290|   	}
#  291|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:153:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:147:1: enter_function: entry to ‘fu_kernel_search_path_locker_dispose’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:150:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:151:35: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:151:35: release_memory: ‘error’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:152:22: call_function: calling ‘fu_kernel_search_path_locker_close’ from ‘fu_kernel_search_path_locker_dispose’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:152:22: return_function: returning to ‘fu_kernel_search_path_locker_dispose’ from ‘fu_kernel_search_path_locker_close’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:152:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:153:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:153:25: release_memory: ‘error’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-kernel-search-path.c:153:25: danger: dereference of NULL ‘error’
#  151|   		g_autoptr(GError) error = NULL;
#  152|   		if (!fu_kernel_search_path_locker_close(self, &error))
#  153|-> 			g_warning("failed to restore path: %s", error->message);
#  154|   	}
#  155|   	G_OBJECT_CLASS(fu_kernel_search_path_locker_parent_class)->dispose(obj);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:609:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:601:1: enter_function: entry to ‘fu_security_attrs_add_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:608:17: call_function: calling ‘fu_security_attrs_get_all’ from ‘fu_security_attrs_add_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:608:17: return_function: returning to ‘fu_security_attrs_add_json’ from ‘fu_security_attrs_get_all’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:609:31: danger: dereference of NULL ‘fu_security_attrs_get_all(codec, 0)’
#  607|   	json_builder_begin_array(builder);
#  608|   	items = fu_security_attrs_get_all(self, NULL);
#  609|-> 	for (guint i = 0; i < items->len; i++) {
#  610|   		FwupdSecurityAttr *attr = g_ptr_array_index(items, i);
#  611|   		guint64 created = fwupd_security_attr_get_created(attr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:780:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:777:1: enter_function: entry to ‘fu_security_attrs_equal’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:779:40: call_function: calling ‘fu_security_attrs_compare’ from ‘fu_security_attrs_equal’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:779:40: return_function: returning to ‘fu_security_attrs_equal’ from ‘fu_security_attrs_compare’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-security-attrs.c:780:16: danger: dereference of NULL ‘fu_security_attrs_compare(attrs1,  attrs2)’
#  778|   {
#  779|   	g_autoptr(GPtrArray) compare = fu_security_attrs_compare(attrs1, attrs2);
#  780|-> 	return compare->len == 0;
#  781|   }
#  782|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2974:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_bos’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2876:1: enter_function: entry to ‘fu_usb_device_add_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2882:27: release_memory: ‘error_bos’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2883:27: release_memory: ‘error_bos’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2884:27: release_memory: ‘error_bos’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2928:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2930:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2958:14: call_function: calling ‘fu_usb_device_ensure_hid_descriptors’ from ‘fu_usb_device_add_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2958:14: return_function: returning to ‘fu_usb_device_add_json’ from ‘fu_usb_device_ensure_hid_descriptors’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2972:22: call_function: calling ‘fu_usb_device_get_interfaces’ from ‘fu_usb_device_add_json’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2972:22: return_function: returning to ‘fu_usb_device_add_json’ from ‘fu_usb_device_get_interfaces’
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2973:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2974:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2974:17: release_memory: ‘error_bos’ is NULL
fwupd-2.0.8/redhat-linux-build/../libfwupdplugin/fu-usb-device.c:2974:17: danger: dereference of NULL ‘error_interfaces’
# 2972|   	interfaces = fu_usb_device_get_interfaces(self, &error_interfaces);
# 2973|   	if (interfaces == NULL) {
# 2974|-> 		g_debug("%s", error_interfaces->message);
# 2975|   	} else if (interfaces->len > 0) {
# 2976|   		json_builder_set_member_name(builder, "UsbInterfaces");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:765:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(fu_udev_device_get_sysfs_path(device), g_strdup_printf("resource%u", i * 2), 0), 1052674)’
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:745:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:756:27: branch_true: following ‘true’ branch (when ‘i != 3’)...
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:763:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:765:25: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../plugins/bcm57xx/fu-bcm57xx-recovery-device.c:765:25: danger: ‘open(g_build_filename(fu_udev_device_get_sysfs_path(device), g_strdup_printf("resource%u", i * 2), 0), 1052674)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  763|   		resfn = g_strdup_printf("resource%u", i * 2);
#  764|   		fn = g_build_filename(sysfs_path, resfn, NULL);
#  765|-> 		memfd = open(fn, O_RDWR | O_SYNC);
#  766|   		if (memfd < 0) {
#  767|   			g_set_error(error,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:838:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:760:1: enter_function: entry to ‘fu_cros_ec_usb_device_write_firmware’
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:821:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:825:9: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:828:27: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:829:52: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:830:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:830:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:830:35: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:832:22: call_function: calling ‘fu_cros_ec_usb_device_transfer_section’ from ‘fu_cros_ec_usb_device_write_firmware’
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:832:22: return_function: returning to ‘fu_cros_ec_usb_device_write_firmware’ from ‘fu_cros_ec_usb_device_transfer_section’
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:832:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:837:29: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:837:29: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:837:28: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:838:33: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:838:33: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/cros-ec/fu-cros-ec-usb-device.c:838:33: danger: dereference of NULL ‘error_local’
#  836|   							    &error_local)) {
#  837|   			if (g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_READ)) {
#  838|-> 				g_debug("failed to transfer section, trying another write, "
#  839|   					"ignoring error: %s",
#  840|   					error_local->message);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:931:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:924:1: enter_function: entry to ‘fu_dell_dock_ec_setup’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:926:27: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:929:14: call_function: calling ‘fu_dell_dock_ec_query’ from ‘fu_dell_dock_ec_setup’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:929:14: return_function: returning to ‘fu_dell_dock_ec_setup’ from ‘fu_dell_dock_ec_query’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:929:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:930:21: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:930:21: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:930:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:931:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:931:25: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-ec.c:931:25: danger: dereference of NULL ‘error_local’
#  929|   	if (!fu_dell_dock_ec_query(device, &error_local)) {
#  930|   		if (g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_SIGNATURE_INVALID)) {
#  931|-> 			g_warning("%s", error_local->message);
#  932|   			fu_device_sleep(device, 2000); /* ms */
#  933|   			if (!fu_dell_dock_ec_query(device, error))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:284:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1029:1: enter_function: entry to ‘fu_dell_dock_mst_write_fw’
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1041:9: branch_true: following ‘true’ branch (when ‘device’ is non-NULL)...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1042:9: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1042:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1043:9: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1043:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1046:14: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1046:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1050:45: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1050:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1054:14: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1055:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1057:16: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/dell-dock/fu-dell-dock-mst.c:1066:14: call_function: calling ‘fu_dell_dock_mst_enable_remote_control’ from ‘fu_dell_dock_mst_write_fw’
#  282|   					 (guint8 *)data,
#  283|   					 &error_local)) {
#  284|-> 		g_debug("Failed to enable remote control: %s", error_local->message);
#  285|   		/* try to disable / re-enable */
#  286|   		if (!fu_dell_dock_mst_disable_remote_control(device, error))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:499:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_attach’
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:484:1: enter_function: entry to ‘fu_legion_hid2_device_attach’
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:488:27: release_memory: ‘error_attach’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:490:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:493:15: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:497:18: call_function: calling ‘fu_legion_hid2_device_tlv’ from ‘fu_legion_hid2_device_attach’
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:497:18: return_function: returning to ‘fu_legion_hid2_device_attach’ from ‘fu_legion_hid2_device_tlv’
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:498:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:499:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:499:17: release_memory: ‘error_attach’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/legion-hid2/fu-legion-hid2-device.c:499:17: danger: dereference of NULL ‘error_attach’
#  497|   	result = fu_legion_hid2_device_tlv(FU_LEGION_HID2_DEVICE(device), cmd, &error_attach);
#  498|   	if (result == NULL)
#  499|-> 		g_debug("failed to attach: %s", error_attach->message);
#  500|   
#  501|   	fu_device_add_flag(device, FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
fwupd-2.0.8/redhat-linux-build/../plugins/nvme/fu-nvme-device.c:256:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
fwupd-2.0.8/redhat-linux-build/../plugins/nvme/fu-nvme-device.c:518:1: enter_function: entry to ‘fu_nvme_device_new_from_blob’
fwupd-2.0.8/redhat-linux-build/../plugins/nvme/fu-nvme-device.c:522:14: call_function: calling ‘fu_nvme_device_parse_cns’ from ‘fu_nvme_device_new_from_blob’
#  254|   
#  255|   	/* firmware update granularity (FWUG) */
#  256|-> 	fwug = buf[319];
#  257|   	if (fwug != 0x00 && fwug != 0xff)
#  258|   		self->write_block_size = ((guint64)fwug) * 0x1000;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1519:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1523:26: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1529:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: danger: ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 1537|   			return FALSE;
# 1538|   		}
# 1539|-> 		fd = open(filename, O_RDONLY);
# 1540|   		if (fd == -1) {
# 1541|   			g_set_error(error,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1519:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1523:26: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1529:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1540:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:21: danger: ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 1546|   			return FALSE;
# 1547|   		}
# 1548|-> 		if (read(fd, buf, 2) != 2) {
# 1549|   			g_set_error(error,
# 1550|   				    FWUPD_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1549:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1519:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1523:26: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1529:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1540:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:20: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1549:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1549:25: danger: ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 1547|   		}
# 1548|   		if (read(fd, buf, 2) != 2) {
# 1549|-> 			g_set_error(error,
# 1550|   				    FWUPD_ERROR,
# 1551|   				    FWUPD_ERROR_INVALID_DATA,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1557:34: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1519:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1523:26: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1529:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1531:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1539:22: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1540:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1548:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1557:34: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/synaptics-mst/fu-synaptics-mst-device.c:1557:34: danger: ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
# 1555|   			return FALSE;
# 1556|   		}
# 1557|-> 		self->board_id = fu_memread_uint16(buf, G_BIG_ENDIAN);
# 1558|   		close(fd);
# 1559|   		return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:41:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:34:1: enter_function: entry to ‘fu_thunderbolt_udev_set_port_offline’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:37:27: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:39:21: call_function: calling ‘fu_thunderbolt_device_find_usb4_port_path’ from ‘fu_thunderbolt_udev_set_port_offline’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:39:21: return_function: returning to ‘fu_thunderbolt_udev_set_port_offline’ from ‘fu_thunderbolt_device_find_usb4_port_path’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:40:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:41:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:41:17: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:41:17: danger: dereference of NULL ‘error_local’
#   39|   	attribute = fu_thunderbolt_device_find_usb4_port_path(device, "offline", &error_local);
#   40|   	if (attribute == NULL) {
#   41|-> 		g_debug("failed to check usb4 offline path: %s", error_local->message);
#   42|   		return TRUE;
#   43|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:63:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:56:1: enter_function: entry to ‘fu_thunderbolt_udev_rescan_port’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:59:27: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:61:21: call_function: calling ‘fu_thunderbolt_device_find_usb4_port_path’ from ‘fu_thunderbolt_udev_rescan_port’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:61:21: return_function: returning to ‘fu_thunderbolt_udev_rescan_port’ from ‘fu_thunderbolt_device_find_usb4_port_path’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:62:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:63:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:63:17: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:63:17: danger: dereference of NULL ‘error_local’
#   61|   	attribute = fu_thunderbolt_device_find_usb4_port_path(device, "rescan", &error_local);
#   62|   	if (attribute == NULL) {
#   63|-> 		g_debug("failed to check usb4 rescan path: %s", error_local->message);
#   64|   		return TRUE;
#   65|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:86:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:78:1: enter_function: entry to ‘fu_thunderbolt_udev_set_port_online’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:82:27: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:84:21: call_function: calling ‘fu_thunderbolt_device_find_usb4_port_path’ from ‘fu_thunderbolt_udev_set_port_online’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:84:21: return_function: returning to ‘fu_thunderbolt_udev_set_port_online’ from ‘fu_thunderbolt_device_find_usb4_port_path’
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:85:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:86:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:86:17: release_memory: ‘error_local’ is NULL
fwupd-2.0.8/redhat-linux-build/../plugins/thunderbolt/fu-thunderbolt-common.c:86:17: danger: dereference of NULL ‘error_local’
#   84|   	attribute = fu_thunderbolt_device_find_usb4_port_path(device, "offline", &error_local);
#   85|   	if (attribute == NULL) {
#   86|-> 		g_debug("failed to check usb4 port path: %s", error_local->message);
#   87|   		return TRUE;
#   88|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:298:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:285:1: enter_function: entry to ‘fu_console_box’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:288:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:292:9: call_function: inlined call to ‘fu_console_reset_line’ from ‘fu_console_box’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:293:9: call_function: calling ‘fu_console_box_line’ from ‘fu_console_box’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:293:9: return_function: returning to ‘fu_console_box’ from ‘fu_console_box_line’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:296:12: branch_true: following ‘true’ branch (when ‘title’ is non-NULL)...
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:297:46: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:297:46: call_function: calling ‘fu_console_strsplit_words’ from ‘fu_console_box’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:297:46: return_function: returning to ‘fu_console_box’ from ‘fu_console_strsplit_words’
fwupd-2.0.8/redhat-linux-build/../src/fu-console.c:298:39: danger: dereference of NULL ‘fu_console_strsplit_words(title,  width + 4294967292)’
#  296|   	if (title != NULL) {
#  297|   		g_autoptr(GPtrArray) lines = fu_console_strsplit_words(title, width - 4);
#  298|-> 		for (guint j = 0; j < lines->len; j++) {
#  299|   			const gchar *line = g_ptr_array_index(lines, j);
#  300|   			fu_console_box_line("║ ", line, " ║", " ", width);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:122:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:112:1: enter_function: entry to ‘fu_daemon_schedule_process_quit_cb’
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:116:27: release_memory: ‘error’ is NULL
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:121:14: call_function: calling ‘fu_daemon_stop’ from ‘fu_daemon_schedule_process_quit_cb’
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:121:14: return_function: returning to ‘fu_daemon_schedule_process_quit_cb’ from ‘fu_daemon_stop’
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:121:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:122:17: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:122:17: release_memory: ‘error’ is NULL
fwupd-2.0.8/redhat-linux-build/../src/fu-daemon.c:122:17: danger: dereference of NULL ‘error’
#  120|   
#  121|   	if (!fu_daemon_stop(self, &error))
#  122|-> 		g_warning("failed to stop daemon, will wait: %s\n", error->message);
#  123|   	return G_SOURCE_REMOVE;
#  124|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
fwupd-2.0.8/redhat-linux-build/../src/fu-engine-config.c:216:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
fwupd-2.0.8/redhat-linux-build/../src/fu-engine-config.c:227:1: enter_function: entry to ‘fu_engine_config_changed_cb’
fwupd-2.0.8/redhat-linux-build/../src/fu-engine-config.c:230:9: call_function: calling ‘fu_engine_config_reload’ from ‘fu_engine_config_changed_cb’
#  214|   			    fu_engine_config_report_from_spec(self, report_specs[i], &error_local);
#  215|   			if (report == NULL) {
#  216|-> 				g_warning("failed to parse %s: %s",
#  217|   					  report_specs[i],
#  218|   					  error_local->message);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:98:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 1)’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:52:9: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:54:22: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:59:12: branch_false: following ‘false’ branch (when ‘n_agent_pid >= 0’)...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:62:12: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:62:12: branch_false: following ‘false’ branch (when ‘n_agent_pid == 0’)...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:69:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:69:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:74:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:74:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:78:25: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:81:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:89:22: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:89:22: acquire_resource: opened here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:90:20: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:94:20: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:94:20: branch_true: following ‘true’ branch (when ‘stdout_is_tty == 0’)...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:95:25: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:96:20: branch_false: following ‘false’ branch (when ‘stderr_is_tty != 0’)...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:98:20: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:98:20: danger: ‘open("/dev/tty", 1)’ leaks here; was opened at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#   96|   		if (!stderr_is_tty)
#   97|   			dup2(fd, STDERR_FILENO);
#   98|-> 		if (fd > 2)
#   99|   			close(fd);
#  100|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:244:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fd[0]’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:181:1: enter_function: entry to ‘fu_polkit_agent_open’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:188:9: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:191:13: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:191:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:195:25: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:196:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:205:14: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:205:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:207:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:207:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:217:21: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:218:13: call_function: calling ‘fu_polkit_agent_fork_agent’ from ‘fu_polkit_agent_open’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:218:13: return_function: returning to ‘fu_polkit_agent_open’ from ‘fu_polkit_agent_fork_agent’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:225:12: branch_true: following ‘true’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:230:40: branch_true: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:231:17: call_function: calling ‘fu_polkit_agent_close_nointr_nofail’ from ‘fu_polkit_agent_open’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:231:17: return_function: returning to ‘fu_polkit_agent_open’ from ‘fu_polkit_agent_close_nointr_nofail’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:232:17: call_function: calling ‘fu_polkit_agent_close_nointr_nofail’ from ‘fu_polkit_agent_open’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:232:17: return_function: returning to ‘fu_polkit_agent_open’ from ‘fu_polkit_agent_close_nointr_nofail’
fwupd-2.0.8/redhat-linux-build/../src/fu-polkit-agent.c:244:1: danger: ‘pipe_fd[0]’ leaks here
#  242|   	fu_polkit_agent_close_nointr_nofail(pipe_fd[0]);
#  243|   	return TRUE;
#  244|-> }
#  245|   
#  246|   static void

Error: GCC_ANALYZER_WARNING (CWE-688): [#def31]
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1303:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1273:1: enter_function: entry to ‘fu_release_compare’
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1275:29: call_function: calling ‘fu_release_get_device’ from ‘fu_release_compare’
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1275:29: return_function: returning to ‘fu_release_compare’ from ‘fu_release_get_device’
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1276:29: call_function: calling ‘fu_release_get_device’ from ‘fu_release_compare’
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1276:29: return_function: returning to ‘fu_release_compare’ from ‘fu_release_get_device’
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1279:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1287:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1287:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1289:12: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1289:12: branch_false: following ‘false’ branch...
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1293:13: branch_false: ...to here
fwupd-2.0.8/redhat-linux-build/../src/fu-release.c:1303:16: danger: argument 1 (‘fu_release_get_device(release1)’) NULL where non-null expected
# 1301|   
# 1302|   	/* FWUPD_DEVICE_FLAG_INSTALL_ALL_RELEASES has to be from oldest to newest */
# 1303|-> 	return fu_version_compare(fu_release_get_version(release1),
# 1304|   				  fu_release_get_version(release2),
# 1305|   				  fu_device_get_version_format(device1));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def32]
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1647:24: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1633:1: enter_function: entry to ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: call_function: calling ‘fu_util_plugin_flag_to_string’ from ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: return_function: returning to ‘fu_util_plugin_flag_to_cli_text’ from ‘fu_util_plugin_flag_to_string’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1647:24: danger: argument 1 (‘fu_util_plugin_flag_to_string(plugin_flag)’) NULL where non-null expected
# 1645|   	case FWUPD_PLUGIN_FLAG_MEASURE_SYSTEM_INTEGRITY:
# 1646|   	case FWUPD_PLUGIN_FLAG_SECURE_CONFIG:
# 1647|-> 		return fu_console_color_format(plugin_flag_str, FU_CONSOLE_COLOR_GREEN);
# 1648|   	case FWUPD_PLUGIN_FLAG_DISABLED:
# 1649|   	case FWUPD_PLUGIN_FLAG_NO_HARDWARE:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def33]
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1651:24: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1633:1: enter_function: entry to ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: call_function: calling ‘fu_util_plugin_flag_to_string’ from ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: return_function: returning to ‘fu_util_plugin_flag_to_cli_text’ from ‘fu_util_plugin_flag_to_string’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1651:24: danger: argument 1 (‘fu_util_plugin_flag_to_string(plugin_flag)’) NULL where non-null expected
# 1649|   	case FWUPD_PLUGIN_FLAG_NO_HARDWARE:
# 1650|   	case FWUPD_PLUGIN_FLAG_TEST_ONLY:
# 1651|-> 		return fu_console_color_format(plugin_flag_str, FU_CONSOLE_COLOR_BLACK);
# 1652|   	case FWUPD_PLUGIN_FLAG_LEGACY_BIOS:
# 1653|   	case FWUPD_PLUGIN_FLAG_CAPSULES_UNSUPPORTED:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def34]
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1660:24: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1633:1: enter_function: entry to ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: call_function: calling ‘fu_util_plugin_flag_to_string’ from ‘fu_util_plugin_flag_to_cli_text’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1635:45: return_function: returning to ‘fu_util_plugin_flag_to_cli_text’ from ‘fu_util_plugin_flag_to_string’
fwupd-2.0.8/redhat-linux-build/../src/fu-util-common.c:1660:24: danger: argument 1 (‘fu_util_plugin_flag_to_string(plugin_flag)’) NULL where non-null expected
# 1658|   	case FWUPD_PLUGIN_FLAG_ESP_NOT_VALID:
# 1659|   	case FWUPD_PLUGIN_FLAG_KERNEL_TOO_OLD:
# 1660|-> 		return fu_console_color_format(plugin_flag_str, FU_CONSOLE_COLOR_RED);
# 1661|   	default:
# 1662|   		break;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-85.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namefwupd-2.0.8-2.fc43
store-results-to/tmp/tmp77vprdny/fwupd-2.0.8-2.fc43.tar.xz
time-created2025-04-25 12:41:59
time-finished2025-04-25 12:53:31
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp77vprdny/fwupd-2.0.8-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp77vprdny/fwupd-2.0.8-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9