gnome-control-center-47.1.1-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘get_portal_permissions’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:226:11: warning[-Wanalyzer-null-argument]: use of NULL ‘app_id’ where non-null expected
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘get_portal_permissions’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘get_portal_permissions’
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib/gi18n.h:23: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:25: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:385:17: note: in expansion of macro ‘GPOINTER_TO_INT’
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
/usr/include/malcontent-0/libmalcontent/app-filter.h:26: included_from: Included from here.
/usr/include/malcontent-0/libmalcontent/malcontent.h:25: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:27: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’
/usr/include/gtk-4.0/gtk/gtkwidget.h:44:44: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:939:31: note: in expansion of macro ‘GTK_WIDGET’
/usr/include/glib-2.0/glib/glist.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/ghash.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:706:3: note: in expansion of macro ‘g_clear_pointer’
/usr/include/glib-2.0/gobject/gobject.h:767:32: note: in definition of macro ‘g_set_object’
/usr/include/glib-2.0/gobject/gobject.h:770:50: note: in definition of macro ‘g_set_object’
/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.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:448:15: note: in expansion of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘get_portal_permissions’
/usr/include/glib-2.0/gobject/gobject.h:770:50: note: in definition of macro ‘g_set_object’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
#  224|     while (g_variant_iter_loop (iter, "{&s^a&s}", &key, &val))
#  225|       {
#  226|->       if (strcmp (key, app_id) == 0 && result == NULL)
#  227|           result = g_strdupv (val);
#  228|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘munge_app_id’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:457:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:1464:3: note: in expansion of macro ‘g_clear_pointer’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:1465:3: note: in expansion of macro ‘g_clear_pointer’
/usr/include/glib-2.0/gobject/gobject.h:767:32: note: in definition of macro ‘g_set_object’
/usr/include/glib-2.0/gobject/gobject.h:770:50: note: in definition of macro ‘g_set_object’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c:448:15: note: in expansion of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/cc-applications-panel.c: scope_hint: In function ‘munge_app_id’
#  455|                 "-",
#  456|                 '-');
#  457|->   for (i = 0; id[i] != '\0'; i++)
#  458|       id[i] = g_ascii_tolower (id[i]);
#  459|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/utils.c: scope_hint: In function ‘get_app_id’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/applications/utils.c:254:12: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  252|   
#  253|     if (g_str_has_suffix (app_id, ".desktop"))
#  254|->     app_id[strlen (app_id) - strlen (".desktop")] = '\0';
#  255|   
#  256|     return app_id;

Error: COMPILER_WARNING (CWE-457): [#def4]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/cc-number-row.c: scope_hint: In function ‘number_row_settings_changed_cb’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/cc-number-row.c:680:14: warning[-Wmaybe-uninitialized]: ‘value’ may be used uninitialized
#  680 |         if (!cc_number_row_has_value (self, value, &position))
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/cc-number-row.c:656:9: note: ‘value’ was declared here
#  656 |     int value;
#      |         ^~~~~
#  678|       g_signal_handler_block (self, self->number_row_selected_changed_id);
#  679|       if (position != GTK_INVALID_LIST_POSITION)
#  680|->         if (!cc_number_row_has_value (self, value, &position))
#  681|               position = cc_number_row_add_value (self, value);
#  682|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:19: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c: scope_hint: In function ‘pretty_hostname_to_ssid’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:222:27: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:222:17: note: in expansion of macro ‘g_assert’
/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.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:221:30: note: in expansion of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c: scope_hint: In function ‘pretty_hostname_to_ssid’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:222:17: note: in expansion of macro ‘g_assert’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/common/hostname-helper.c:222:17: note: in expansion of macro ‘g_assert’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  220|   		/* translators: This is the default hotspot name, need to be less than 32-bytes */
#  221|   		gchar *ret = g_strdup (C_("hotspot", "Hotspot"));
#  222|-> 		g_assert (strlen (ret) <= SSID_MAX_LEN);
#  223|   		return ret;
#  224|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-input-list-box.c: scope_hint: In function ‘add_input_sources_from_localed’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-input-list-box.c:623:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/gnome-desktop-4.0/libgnome-desktop/gnome-xkb-info.h:31: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-input-list-box.c:26: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:942:23: note: in definition of macro ‘MIN’
#  621|       n = 0;
#  622|   
#  623|->   for (i = 0; i < n && layouts[i][0]; i++) {
#  624|       const char *variant = variants ? variants[i] : NULL;
#  625|       g_autoptr(CcInputSourceXkb) source = cc_input_source_xkb_new (self->xkb_info, layouts[i], variant);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-keyboard-item.c: scope_hint: In function ‘translate_above_tab’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-keyboard-item.c:543:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘str’
#  541|     char **str;
#  542|   
#  543|->   for (str = original_bindings; *str && !needs_translation; str++)
#  544|       needs_translation = strstr (*str, "Above_Tab") != NULL;
#  545|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-xkb-modifier-page.c: scope_hint: In function ‘update_active_radio’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-xkb-modifier-page.c:104:83: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  102|       {
#  103|         default_option = get_xkb_option_from_name(self->modifier, self->modifier->default_option);
#  104|->       rightalt_radio = get_radio_button_from_xkb_option_name (self, default_option->xkb_option);
#  105|         gtk_check_button_set_active (GTK_CHECK_BUTTON (rightalt_radio), TRUE);
#  106|         adw_switch_row_set_active (self->switch_row, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-xkb-modifier-page.c: scope_hint: In function ‘xcb_modifier_transform_binding_to_label’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/keyboard/cc-xkb-modifier-page.c:332:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entry’
#  330|   
#  331|     g_value_set_string (value,
#  332|->                       g_dpgettext2 (NULL, "keyboard key", entry->label));
#  333|     return TRUE;
#  334|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c: scope_hint: In function ‘mtu_output_cb’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:73: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.
/usr/include/glib-2.0/glib/gi18n.h:23: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:24: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:69:33: note: in expansion of macro ‘_’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:69:23: note: in expansion of macro ‘g_strdup’
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
/usr/include/libnm/NetworkManager.h:11: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:26: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c: scope_hint: In function ‘mtu_output_cb’
/usr/include/glib-2.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’
/usr/include/gtk-4.0/gtk/gtkeditable.h:38:40: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/network/connection-editor/ce-page-ethernet.c:73:49: note: in expansion of macro ‘GTK_EDITABLE’
/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
#   71|                   buf = g_strdup_printf ("%d", val);
#   72|   
#   73|->         if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (self->mtu_spin))))
#   74|                   gtk_editable_set_text (GTK_EDITABLE (self->mtu_spin), buf);
#   75|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c: scope_hint: In function ‘app_info_get_id’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:364:7: warning[-Wanalyzer-null-argument]: use of NULL ‘ret’ where non-null expected
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/gtk-4.0/gtk/css/gtkcss.h:29: included_from: Included from here.
/usr/include/gtk-4.0/gtk/gtk.h:29: included_from: Included from here.
/usr/include/libadwaita-1/adwaita.h:9: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:22: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1251:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:361:7: note: in expansion of macro ‘G_UNLIKELY’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1251:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:190:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:361:19: note: in expansion of macro ‘g_str_has_suffix’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1251:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:361:7: note: in expansion of macro ‘G_UNLIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:361:19: note: in expansion of macro ‘g_str_has_suffix’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1251:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:361:7: note: in expansion of macro ‘G_UNLIKELY’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  362|       return NULL;
#  363|   
#  364|->   l = strlen (ret);
#  365|     *(ret + l - strlen(".desktop")) = '\0';
#  366|     return g_steal_pointer (&ret);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c: scope_hint: In function ‘process_app_info’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:386:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  384|                 "-",
#  385|                 '-');
#  386|->   for (i = 0; app_id[i] != '\0'; i++)
#  387|       app_id[i] = g_ascii_tolower (app_id[i]);
#  388|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def13]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c: scope_hint: In function ‘select_app’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/notifications/cc-notifications-panel.c:474:12: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  472|     app_id = g_strdup (g_app_info_get_id (app->app_info));
#  473|     if (g_str_has_suffix (app_id, ".desktop"))
#  474|->     app_id[strlen (app_id) - strlen (".desktop")] = '\0';
#  475|   
#  476|     page = cc_app_notifications_page_new (app_id, g_app_info_get_name (app->app_info), app->settings, self->master_settings, self->perm_store);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def14]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/printers/pp-maintenance-command.c: scope_hint: In function ‘_pp_maintenance_command_execute_thread’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/printers/pp-maintenance-command.c:232:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file’ where non-null expected
<built-in>: note: argument 4 of ‘__builtin_fwrite’ must be non-null
#  230|   
#  231|             file = fdopen (fd, "w");
#  232|->           fprintf (file, "#CUPS-COMMAND\n");
#  233|             fprintf (file, "%s", self->command);
#  234|             if (self->parameters)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/sharing/file-share-properties.c: scope_hint: In function ‘file_share_write_out_password’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/sharing/file-share-properties.c:50:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’
#   48|       filename = g_build_filename (g_get_user_config_dir (), "user-share", "passwd", NULL);
#   49|   
#   50|->     file = fopen (filename, "w");
#   51|       if (file != NULL) {
#   52|   	fwrite (line, strlen (line), 1, file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/sharing/file-share-properties.c:50:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’
#   48|       filename = g_build_filename (g_get_user_config_dir (), "user-share", "passwd", NULL);
#   49|   
#   50|->     file = fopen (filename, "w");
#   51|       if (file != NULL) {
#   52|   	fwrite (line, strlen (line), 1, file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/sharing/file-share-properties.c:52:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’
#   50|       file = fopen (filename, "w");
#   51|       if (file != NULL) {
#   52|-> 	fwrite (line, strlen (line), 1, file);
#   53|   	fclose (file);
#   54|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/sharing/file-share-properties.c:52:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’
#   50|       file = fopen (filename, "w");
#   51|       if (file != NULL) {
#   52|-> 	fwrite (line, strlen (line), 1, file);
#   53|   	fclose (file);
#   54|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c: scope_hint: In function ‘tz_load_db’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:61:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
#   59|   		return NULL;
#   60|   	}
#   61|-> 	tzfile = fopen (tz_data_file, "r");
#   62|   	if (!tzfile) {
#   63|   		g_warning ("Could not open *%s*\n", tz_data_file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:61:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
#   59|   		return NULL;
#   60|   	}
#   61|-> 	tzfile = fopen (tz_data_file, "r");
#   62|   	if (!tzfile) {
#   63|   		g_warning ("Could not open *%s*\n", tz_data_file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:68:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   66|   
#   67|   	tz_db = g_new0 (TzDB, 1);
#   68|-> 	tz_db->locations = g_ptr_array_new ();
#   69|   
#   70|   	while (fgets (buf, sizeof(buf), tzfile))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:68:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   66|   
#   67|   	tz_db = g_new0 (TzDB, 1);
#   68|-> 	tz_db->locations = g_ptr_array_new ();
#   69|   
#   70|   	while (fgets (buf, sizeof(buf), tzfile))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:70:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   68|   	tz_db->locations = g_ptr_array_new ();
#   69|   
#   70|-> 	while (fgets (buf, sizeof(buf), tzfile))
#   71|   	{
#   72|   		g_auto(GStrv) tmpstrarr = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:70:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   68|   	tz_db->locations = g_ptr_array_new ();
#   69|   
#   70|-> 	while (fgets (buf, sizeof(buf), tzfile))
#   71|   	{
#   72|   		g_auto(GStrv) tmpstrarr = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:78:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   76|   		TzLocation *loc;
#   77|   
#   78|-> 		if (*buf == '#') continue;
#   79|   
#   80|   		g_strchomp(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:78:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro ‘_G_NEW’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:67:17: note: in expansion of macro ‘g_new0’
#   76|   		TzLocation *loc;
#   77|   
#   78|-> 		if (*buf == '#') continue;
#   79|   
#   80|   		g_strchomp(buf);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c: scope_hint: In function ‘tz_location_get_base_utc_offset’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:215:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:235:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/datetime/tz.c:235:9: note: in expansion of macro ‘g_return_val_if_fail’
#  213|   
#  214|   	tz_info = tz_info_from_location (loc);
#  215|-> 	offset = tz_info->utc_offset + (tz_info->daylight ? -3600 : 0);
#  216|   
#  217|   	for (i = 0; i < G_N_ELEMENTS (base_offset_overrides); i++) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def28]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/remote-desktop/cc-remote-login-page.c: scope_hint: In function ‘on_tls_certificate_generated’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/remote-desktop/cc-remote-login-page.c:257:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.crt", 0), 0)’
#  255|     fd_list = g_unix_fd_list_new ();
#  256|   
#  257|->   certificate_fd = open (certificate_path, O_RDONLY);
#  258|     key_fd = open (key_path, O_RDONLY);
#  259|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/remote-desktop/cc-remote-login-page.c:258:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.key", 0), 0)’
#  256|   
#  257|     certificate_fd = open (certificate_path, O_RDONLY);
#  258|->   key_fd = open (key_path, O_RDONLY);
#  259|   
#  260|     if (certificate_fd != -1 && key_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def30]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-fingerprint-dialog.c: scope_hint: In function ‘fingerprint_menu_button’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-fingerprint-dialog.c:398:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘button’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib/gi18n.h:23: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-fingerprint-dialog.c:23: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-fingerprint-dialog.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-fingerprint-dialog.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’
#  396|     gtk_flow_box_child_set_child (GTK_FLOW_BOX_CHILD (flowbox_child), box);
#  397|   
#  398|->   g_object_set_data (G_OBJECT (flowbox_child), "button", button);
#  399|     g_object_set_data (G_OBJECT (flowbox_child), "icon",
#  400|                        GTK_IMAGE (gtk_menu_button_get_child (GTK_MENU_BUTTON (button))));

Error: CPPCHECK_WARNING (CWE-457): [#def31]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/panels/system/users/cc-users-page.c:221: warning[uninitvar]: Uninitialized variable: n_users
#  219|           /* Increase the user count for all accounts except for "system" accounts, such
#  220|            * as "root" or "nobody". */
#  221|->         n_users++;
#  222|           if (act_user_get_uid (user) == getuid ()) {
#  223|               cc_user_page_set_user (self->current_user_page, user, self->permission);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def32]
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c: scope_hint: In function ‘get_profile_canonical_name’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:317:13: warning[-Wanalyzer-null-argument]: use of NULL ‘profile_name’ where non-null expected
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.h:22: included_from: Included from here.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:23: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:480:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.h:30:47: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:480:31: note: in expansion of macro ‘GVC_IS_MIXER_UI_DEVICE’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:480:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.h:30:47: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:480:31: note: in expansion of macro ‘GVC_IS_MIXER_UI_DEVICE’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:481:9: note: in expansion of macro ‘g_return_val_if_fail’
/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.
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:318:24: note: in expansion of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c: scope_hint: In function ‘get_profile_canonical_name’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c:318:24: note: in expansion of macro ‘g_strdup’
gnome-control-center-47.1.1-build/gnome-control-center-47.1.1/subprojects/gvc/gvc-mixer-ui-device.c: scope_hint: In function ‘get_profile_canonical_name’
<built-in>: note: argument 1 of ‘__builtin_strstr’ must be non-null
#  315|   
#  316|           /* optimisation for the simple case. */
#  317|->         if (strstr (profile_name, skip_prefix) == NULL)
#  318|                   return g_strdup (profile_name);
#  319|   

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-190.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namegnome-control-center-47.1.1-1.fc42
store-results-to/tmp/tmp128g3q_q/gnome-control-center-47.1.1-1.fc42.tar.xz
time-created2024-11-13 00:10:22
time-finished2024-11-13 00:20:00
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp128g3q_q/gnome-control-center-47.1.1-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp128g3q_q/gnome-control-center-47.1.1-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9