gnome-control-center-48.1-1.fc43

List of Findings

Error: COMPILER_WARNING (CWE-457): [#def1]
gnome-control-center-48.1/panels/common/cc-number-row.c: scope_hint: In function ‘number_row_settings_changed_cb’
gnome-control-center-48.1/panels/common/cc-number-row.c:688:14: warning[-Wmaybe-uninitialized]: ‘value’ may be used uninitialized
#  688 |         if (!cc_number_row_has_value (self, value, &position))
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gnome-control-center-48.1/panels/common/cc-number-row.c:664:9: note: ‘value’ was declared here
#  664 |     int value;
#      |         ^~~~~
#  686|       g_signal_handler_block (self, self->number_row_selected_changed_id);
#  687|       if (position != GTK_INVALID_LIST_POSITION)
#  688|->         if (!cc_number_row_has_value (self, value, &position))
#  689|               position = cc_number_row_add_value (self, value);
#  690|   

Error: CPPCHECK_WARNING (CWE-457): [#def2]
gnome-control-center-48.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): [#def3]
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:237:11: warning[-Wanalyzer-null-argument]: use of NULL ‘app_id’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1493:1: enter_function: entry to ‘update_panel’
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1498:6: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1505:6: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1505:6: branch_false: following ‘false’ branch (when ‘row’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1511:10: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1522:3: call_function: calling ‘update_permissions_group’ from ‘update_panel’
#  235|     while (g_variant_iter_loop (iter, "{&s^a&s}", &key, &val))
#  236|       {
#  237|->       if (strcmp (key, app_id) == 0 && result == NULL)
#  238|           result = g_strdupv (val);
#  239|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:468:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1493:1: enter_function: entry to ‘update_panel’
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1498:6: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1505:6: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1505:6: branch_false: following ‘false’ branch (when ‘row’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1511:10: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1518:3: release_memory: ‘*self.current_app_id’ is NULL
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1519:3: release_memory: ‘*self.current_app_id’ is NULL
gnome-control-center-48.1/redhat-linux-build/../panels/applications/cc-applications-panel.c:1522:3: call_function: calling ‘update_permissions_group’ from ‘update_panel’
#  466|                 "-",
#  467|                 '-');
#  468|->   for (i = 0; id[i] != '\0'; i++)
#  469|       id[i] = g_ascii_tolower (id[i]);
#  470|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
gnome-control-center-48.1/redhat-linux-build/../panels/applications/utils.c:254:12: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/applications/utils.c:253:6: branch_true: following ‘true’ branch (when ‘__result != 0’)...
gnome-control-center-48.1/redhat-linux-build/../panels/applications/utils.c:254:12: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/applications/utils.c:254:12: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#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: GCC_ANALYZER_WARNING (CWE-688): [#def6]
gnome-control-center-48.1/redhat-linux-build/../panels/common/hostname-helper.c:222:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/common/hostname-helper.c:209:1: enter_function: entry to ‘pretty_hostname_to_ssid’
gnome-control-center-48.1/redhat-linux-build/../panels/common/hostname-helper.c:222:17: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#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): [#def7]
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-keyboard-item.c:555:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘str’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-keyboard-item.c:1105:6: enter_function: entry to ‘cc_keyboard_item_disable’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-keyboard-item.c:1107:6: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-keyboard-item.c:1115:8: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-keyboard-item.c:1128:3: call_function: calling ‘binding_changed’ from ‘cc_keyboard_item_disable’
#  553|     char **str;
#  554|   
#  555|->   for (str = original_bindings; *str && !needs_translation; str++)
#  556|       needs_translation = strstr (*str, "Above_Tab") != NULL;
#  557|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:104:69: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:171:1: enter_function: entry to ‘on_xkb_options_changed_cb’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:173:6: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:174:5: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:174:5: call_function: calling ‘update_active_radio’ from ‘on_xkb_options_changed_cb’
#  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-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:332:59: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entry’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:303:1: enter_function: entry to ‘xcb_modifier_transform_binding_to_label’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:321:6: branch_true: following ‘true’ branch (when ‘entry’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:321:24: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:321:7: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:328:15: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:328:15: call_function: calling ‘get_xkb_option_from_name’ from ‘xcb_modifier_transform_binding_to_label’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:328:15: return_function: returning to ‘xcb_modifier_transform_binding_to_label’ from ‘get_xkb_option_from_name’
gnome-control-center-48.1/redhat-linux-build/../panels/keyboard/cc-xkb-modifier-page.c:332:59: danger: 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-48.1/redhat-linux-build/../panels/network/connection-editor/ce-page-ethernet.c:73:13: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/network/connection-editor/ce-page-ethernet.c:60:1: enter_function: entry to ‘mtu_output_cb’
gnome-control-center-48.1/redhat-linux-build/../panels/network/connection-editor/ce-page-ethernet.c:68:12: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/network/connection-editor/ce-page-ethernet.c:69:23: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/network/connection-editor/ce-page-ethernet.c:73:13: danger: argument 1 (‘buf’) NULL where non-null expected
#   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-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:349:7: warning[-Wanalyzer-null-argument]: use of NULL ‘ret’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:346:7: branch_true: following ‘true’ branch (when ‘ret’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:346:7: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:346:7: branch_false: following ‘false’ branch (when ‘__result != 0’)...
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:349:7: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:349:7: danger: argument 1 (‘ret’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  347|       return NULL;
#  348|   
#  349|->   l = strlen (ret);
#  350|     *(ret + l - strlen(".desktop")) = '\0';
#  351|     return g_steal_pointer (&ret);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:371:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:371:21: release_memory: ‘0’ is NULL
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:371:15: danger: dereference of NULL ‘app_info_get_id(app_info) + (sizetype)i’
#  369|                 "-",
#  370|                 '-');
#  371|->   for (i = 0; app_id[i] != '\0'; i++)
#  372|       app_id[i] = g_ascii_tolower (app_id[i]);
#  373|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def13]
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:459:12: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:458:6: branch_true: following ‘true’ branch (when ‘__result != 0’)...
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:459:12: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/notifications/cc-notifications-panel.c:459:12: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  457|     app_id = g_strdup (g_app_info_get_id (app->app_info));
#  458|     if (g_str_has_suffix (app_id, ".desktop"))
#  459|->     app_id[strlen (app_id) - strlen (".desktop")] = '\0';
#  460|   
#  461|     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-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:232:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:196:1: enter_function: entry to ‘_pp_maintenance_command_execute_thread’
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:205:7: call_function: calling ‘_pp_maintenance_command_is_supported’ from ‘_pp_maintenance_command_execute_thread’
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:205:7: return_function: returning to ‘_pp_maintenance_command_execute_thread’ from ‘_pp_maintenance_command_is_supported’
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:205:6: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:210:25: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:227:10: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:231:18: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:231:18: acquire_memory: this call could return NULL
gnome-control-center-48.1/redhat-linux-build/../panels/printers/pp-maintenance-command.c:232:11: danger: argument 4 (‘file’) from [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10) could be NULL where non-null expected
#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-48.1/redhat-linux-build/../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")’
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: danger: ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../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")’
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: danger: ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../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")’
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:51:8: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:52:9: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:52:9: danger: ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../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")’
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:50:12: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:51:8: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:52:9: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/sharing/file-share-properties.c:52:9: danger: ‘fopen(g_build_filename(g_get_user_config_dir(), "user-share", "passwd", 0), "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   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-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   65|   	}
#   66|   
#   67|-> 	tz_db = g_new0 (TzDB, 1);
#   68|   	tz_db->locations = g_ptr_array_new ();
#   69|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   65|   	}
#   66|   
#   67|-> 	tz_db = g_new0 (TzDB, 1);
#   68|   	tz_db->locations = g_ptr_array_new ();
#   69|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:68:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:68:28: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   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): [#def24]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:68:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:68:28: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   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): [#def25]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   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): [#def26]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   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): [#def27]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   76|   		TzLocation *loc;
#   77|   
#   78|-> 		if (*buf == '#') continue;
#   79|   
#   80|   		g_strchomp(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(tz_data_file_get(), "r")’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:61:18: acquire_memory: allocated here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:62:12: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:67:17: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:70:16: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:78:21: danger: ‘fopen(tz_data_file_get(), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#   76|   		TzLocation *loc;
#   77|   
#   78|-> 		if (*buf == '#') continue;
#   79|   
#   80|   		g_strchomp(buf);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:215:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:208:1: enter_function: entry to ‘tz_location_get_base_utc_offset’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:214:19: call_function: calling ‘tz_info_from_location’ from ‘tz_location_get_base_utc_offset’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:214:19: return_function: returning to ‘tz_location_get_base_utc_offset’ from ‘tz_info_from_location’
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:215:18: danger: dereference of NULL ‘tz_info_from_location(loc)’
#  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-688): [#def30]
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:485:11: warning[-Wanalyzer-null-argument]: use of NULL ‘real’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:455:15: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:461:11: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:461:10: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:464:15: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:468:19: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:481:11: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:481:10: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:482:9: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/datetime/tz.c:485:11: danger: argument 1 (‘real’) NULL where non-null expected
#  483|   
#  484|         /* We don't need more than one name for it */
#  485|->       if (g_str_equal (real, "Etc/UTC") ||
#  486|             g_str_equal (real, "Etc/UCT"))
#  487|           real = "Etc/GMT";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:256:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.crt", 0), 0)’
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:247:6: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:254:13: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:256:20: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:256:20: danger: ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.crt", 0), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  254|     fd_list = g_unix_fd_list_new ();
#  255|   
#  256|->   certificate_fd = open (certificate_path, O_RDONLY);
#  257|     key_fd = open (key_path, O_RDONLY);
#  258|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:257:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.key", 0), 0)’
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:247:6: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:254:13: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:257:12: acquire_resource: opened here
gnome-control-center-48.1/redhat-linux-build/../panels/system/remote-desktop/cc-remote-login-page.c:257:12: danger: ‘open(g_build_filename(*(CcRemoteLoginPage *)user_data.temp_cert_dir, "rdp-tls.key", 0), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  255|   
#  256|     certificate_fd = open (certificate_path, O_RDONLY);
#  257|->   key_fd = open (key_path, O_RDONLY);
#  258|   
#  259|     if (certificate_fd != -1 && key_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
gnome-control-center-48.1/redhat-linux-build/../panels/system/users/cc-fingerprint-dialog.c:397:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘button’
gnome-control-center-48.1/redhat-linux-build/../panels/system/users/cc-fingerprint-dialog.c:380:1: enter_function: entry to ‘fingerprint_menu_button’
gnome-control-center-48.1/redhat-linux-build/../panels/system/users/cc-fingerprint-dialog.c:388:9: call_function: calling ‘fingerprint_icon_new’ from ‘fingerprint_menu_button’
gnome-control-center-48.1/redhat-linux-build/../panels/system/users/cc-fingerprint-dialog.c:388:9: return_function: returning to ‘fingerprint_menu_button’ from ‘fingerprint_icon_new’
gnome-control-center-48.1/redhat-linux-build/../panels/system/users/cc-fingerprint-dialog.c:397:3: danger: use of uninitialized value ‘button’ here
#  395|     gtk_flow_box_child_set_child (GTK_FLOW_BOX_CHILD (flowbox_child), box);
#  396|   
#  397|->   g_object_set_data (G_OBJECT (flowbox_child), "button", button);
#  398|     g_object_set_data (G_OBJECT (flowbox_child), "icon",
#  399|                        GTK_IMAGE (gtk_menu_button_get_child (GTK_MENU_BUTTON (button))));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
gnome-control-center-48.1/redhat-linux-build/../panels/wellbeing/cc-screen-time-statistics-row.c:871:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘model_screen_time_per_day’
gnome-control-center-48.1/redhat-linux-build/../panels/wellbeing/cc-screen-time-statistics-row.c:1203:1: enter_function: entry to ‘history_file_update_timeout_cb’
gnome-control-center-48.1/redhat-linux-build/../panels/wellbeing/cc-screen-time-statistics-row.c:1209:3: call_function: calling ‘update_model’ from ‘history_file_update_timeout_cb’
#  869|      * index. This will automatically create the indices between, and initialise
#  870|      * them to zero, which is what we want. */
#  871|->   if (diff_days >= model_screen_time_per_day->len)
#  872|       {
#  873|         const double new_val = 0.0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def35]
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:317:13: warning[-Wanalyzer-null-argument]: use of NULL ‘profile_name’ where non-null expected
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:471:1: enter_function: entry to ‘gvc_mixer_ui_device_get_best_profile’
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:480:9: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:480:9: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:481:9: branch_true: following ‘true’ branch (when ‘current’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:483:13: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:490:12: branch_false: following ‘false’ branch (when ‘selected’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:494:18: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:494:52: branch_true: following ‘true’ branch (when ‘l’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:496:38: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:497:34: call_function: calling ‘get_profile_canonical_name’ from ‘gvc_mixer_ui_device_get_best_profile’
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:497:34: return_function: returning to ‘gvc_mixer_ui_device_get_best_profile’ from ‘get_profile_canonical_name’
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:498:20: branch_true: following ‘true’ branch (when ‘canonical_name_selected’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:499:38: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:494:52: branch_false: following ‘false’ branch (when ‘l’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:505:12: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:505:12: branch_false: following ‘false’ branch (when ‘candidates’ is non-NULL)...
 branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:513:30: branch_true: following ‘true’ branch...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:514:38: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:515:20: branch_true: following ‘true’ branch (when the strings are equal)...
 branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:513:30: branch_false: following ‘false’ branch...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:520:12: branch_false: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:520:12: branch_true: following ‘true’ branch (when ‘result’ is NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:522:52: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:523:42: call_function: calling ‘get_profile_canonical_name’ from ‘gvc_mixer_ui_device_get_best_profile’
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:523:42: return_function: returning to ‘gvc_mixer_ui_device_get_best_profile’ from ‘get_profile_canonical_name’
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:524:38: branch_true: following ‘true’ branch (when ‘l’ is non-NULL)...
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:526:46: branch_true: ...to here
gnome-control-center-48.1/redhat-linux-build/../subprojects/gvc/gvc-mixer-ui-device.c:527:37: call_function: calling ‘get_profile_canonical_name’ from ‘gvc_mixer_ui_device_get_best_profile’
#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.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-237.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-namegnome-control-center-48.1-1.fc43
store-results-to/tmp/tmpfwf7mqsf/gnome-control-center-48.1-1.fc43.tar.xz
time-created2025-04-25 12:51:47
time-finished2025-04-25 13:02:10
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpfwf7mqsf/gnome-control-center-48.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfwf7mqsf/gnome-control-center-48.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9