network-manager-applet-1.36.0-4.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:48: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c:9: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c: scope_hint: In function ‘spin_output_with_mapping’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-macros-internal.h:603:28: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c:56:14: note: in expansion of macro ‘nm_streq’
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:46: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c:52:23: note: in expansion of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c: scope_hint: In function ‘spin_output_with_mapping’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-macros-internal.h:603:40: note: in definition of macro ‘nm_streq’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/ce-page.c:56:14: note: in expansion of macro ‘nm_streq’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  601|   /*****************************************************************************/
#  602|   
#  603|-> #define nm_streq(s1, s2)  (strcmp (s1, s2) == 0)
#  604|   #define nm_streq0(s1, s2) (g_strcmp0 (s1, s2) == 0)
#  605|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def2]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-shared-utils.c: scope_hint: In function ‘nm_utils_strsplit_set’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-shared-utils.c:557:16: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  555|   	/* we allocate the buffer larger, so to copy @str at the
#  556|   	 * end of it as @s0. */
#  557|-> 	ptr0 = g_malloc ((sizeof (const char *) * (alloc_size + 1)) + str_len);
#  558|   	s0 = (char *) &ptr0[alloc_size + 1];
#  559|   	memcpy (s0, str, str_len);

Error: GCC_ANALYZER_WARNING (CWE-131): [#def3]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-shared-utils.c:572:31: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-shared-utils.c:592:24: note: in expansion of macro ‘_is_delimiter’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-shared-utils.c:592:24: note: in expansion of macro ‘_is_delimiter’
#  570|   			 * continues to be in ptr0/s0. We fix that at the end. */
#  571|   			alloc_size *= 2;
#  572|-> 			ptr = g_malloc ((sizeof (const char *) * (alloc_size + 1)) + str_len);
#  573|   			memcpy (ptr, ptr_old, sizeof (const char *) * plen);
#  574|   			if (ptr_old != ptr0)

Error: CPPCHECK_WARNING (CWE-457): [#def4]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-test-utils.h:1317: error[legacyUninitvar]: Uninitialized variable: family
# 1315|   		g_assert_not_reached ();
# 1316|   
# 1317|-> 	addr = nm_ip_address_new (family, address, prefix, NULL);
# 1318|   	g_assert (addr);
# 1319|   	g_assert (nm_setting_ip_config_add_address (s_ip, addr));

Error: CPPCHECK_WARNING (CWE-457): [#def5]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-utils/nm-test-utils.h:1342: error[legacyUninitvar]: Uninitialized variable: family
# 1340|   		g_assert_not_reached ();
# 1341|   
# 1342|-> 	route = nm_ip_route_new (family, dest, prefix, next_hop, metric, NULL);
# 1343|   	g_assert (route);
# 1344|   	g_assert (nm_setting_ip_config_add_route (s_ip, route));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def6]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c: scope_hint: In function ‘bt_get_secrets’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c:206:79: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:46: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c:10: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c:204:29: note: in expansion of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c: scope_hint: In function ‘bt_get_secrets’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  204|   	info->secret_name = g_strdup (req->hints[0]);
#  205|   
#  206|-> 	if (   (!strcmp (req->setting_name, NM_SETTING_CDMA_SETTING_NAME) && !strcmp (info->secret_name, NM_SETTING_CDMA_PASSWORD))
#  207|   	    || (!strcmp (req->setting_name, NM_SETTING_GSM_SETTING_NAME) && !strcmp (info->secret_name, NM_SETTING_GSM_PASSWORD)))
#  208|   		widget = applet_mobile_password_dialog_new (req->connection, &secret_entry);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def7]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c:207:78: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c:204:29: note: in expansion of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/applet-device-bt.c: scope_hint: In function ‘bt_get_secrets’
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  205|   
#  206|   	if (   (!strcmp (req->setting_name, NM_SETTING_CDMA_SETTING_NAME) && !strcmp (info->secret_name, NM_SETTING_CDMA_PASSWORD))
#  207|-> 	    || (!strcmp (req->setting_name, NM_SETTING_GSM_SETTING_NAME) && !strcmp (info->secret_name, NM_SETTING_GSM_PASSWORD)))
#  208|   		widget = applet_mobile_password_dialog_new (req->connection, &secret_entry);
#  209|   	else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def8]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-team.c: scope_hint: In function ‘dialog_to_json’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-team.c:738:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:46: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-team.c:9: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  736|   		/* Glade won't let us have a "" in the model :( */
#  737|   		str = get_combo_box (priv->tx_balancer);
#  738|-> 		if (strcmp (str, "none"))
#  739|   			maybe_set_str (obj2, "name", str);
#  740|   		g_free (str);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-wifi.c: scope_hint: In function ‘channel_spin_output_cb’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-wifi.c:178:13: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:46: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-wifi.c:9: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-wifi.c:144:23: note: in expansion of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/connection-editor/page-wifi.c: scope_hint: In function ‘channel_spin_output_cb’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  176|   	}
#  177|   
#  178|-> 	if (strcmp (buf, gtk_entry_get_text (GTK_ENTRY (spin))))
#  179|   		gtk_entry_set_text (GTK_ENTRY (spin), buf);
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/mobile-helpers.c: scope_hint: In function ‘mobile_helper_get_secrets’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/mobile-helpers.c:521:14: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/shared/nm-default.h:46: included_from: Included from here.
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/mobile-helpers.c:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/mobile-helpers.c:502:29: note: in expansion of macro ‘g_strdup’
network-manager-applet-1.36.0-build/network-manager-applet-1.36.0/src/mobile-helpers.c: scope_hint: In function ‘mobile_helper_get_secrets’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  519|   	}
#  520|   
#  521|-> 	if (!strcmp (info->secret_name, NM_SETTING_GSM_PIN)) {
#  522|   		widget = ask_for_pin (&secret_entry);
#  523|   	} else if (!strcmp (info->secret_name, NM_SETTING_GSM_PASSWORD) ||

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-137.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namenetwork-manager-applet-1.36.0-4.fc42
store-results-to/tmp/tmprg_9sbe4/network-manager-applet-1.36.0-4.fc42.tar.xz
time-created2024-11-13 02:22:04
time-finished2024-11-13 02:25:42
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmprg_9sbe4/network-manager-applet-1.36.0-4.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmprg_9sbe4/network-manager-applet-1.36.0-4.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9