libdecor-0.2.5-2.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
libdecor-0.2.5/src/libdecor-fallback.c:185:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
libdecor-0.2.5/src/libdecor-fallback.c:179:1: enter_function: entry to ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:183:18: call_function: inlined call to ‘zalloc’ from ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:185:9: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  183|   	plugin = zalloc(sizeof *plugin);
#  184|   	libdecor_plugin_init(&plugin->plugin, context, &fallback_plugin_iface);
#  185|-> 	plugin->context = context;
#  186|   
#  187|   	libdecor_notify_plugin_ready(context);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
libdecor-0.2.5/src/libdecor.c:218:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 12)’
libdecor-0.2.5/src/libdecor.c:758:1: enter_function: entry to ‘notify_on_capability_change’
libdecor-0.2.5/src/libdecor.c:764:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:767:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:767:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:768:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:767:13: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:771:9: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:773:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/libdecor.c:784:53: branch_true: ...to here
libdecor-0.2.5/src/libdecor.c:787:17: call_function: calling ‘libdecor_state_new’ from ‘notify_on_capability_change’
#  216|   
#  217|   	state = zalloc(sizeof *state);
#  218|-> 	state->content_width = width;
#  219|   	state->content_height = height;
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libdecor-0.2.5/src/libdecor.c:366:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘configuration’
libdecor-0.2.5/src/libdecor.c:352:1: enter_function: entry to ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:363:12: branch_true: following ‘true’ branch (when ‘configuration’ is NULL)...
libdecor-0.2.5/src/libdecor.c:364:33: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:366:9: danger: ‘configuration’ could be NULL: unchecked value from [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  364|   		configuration = libdecor_configuration_new();
#  365|   
#  366|-> 	configuration->serial = serial;
#  367|   
#  368|   	frame_priv->iface->configure(frame,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
libdecor-0.2.5/src/libdecor.c:438:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’
libdecor-0.2.5/src/libdecor.c:424:1: enter_function: entry to ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:436:45: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:438:9: danger: ‘calloc(1, 24)’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
#  436|   	frame_priv->pending_configuration = libdecor_configuration_new();
#  437|   
#  438|-> 	frame_priv->pending_configuration->has_size = true;
#  439|   	frame_priv->pending_configuration->window_width = width;
#  440|   	frame_priv->pending_configuration->window_height = height;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libdecor-0.2.5/src/libdecor.c:443:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’
libdecor-0.2.5/src/libdecor.c:424:1: enter_function: entry to ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:436:45: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:443:9: danger: ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’ leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#  441|   
#  442|   	frame_priv->pending_configuration->has_window_state = true;
#  443|-> 	frame_priv->pending_configuration->window_state = window_state;
#  444|   }
#  445|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libdecor-0.2.5/src/libdecor.c:583:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 168)’
libdecor-0.2.5/src/libdecor.c:564:1: enter_function: entry to ‘libdecor_decorate’
libdecor-0.2.5/src/libdecor.c:573:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:576:17: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:577:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:580:22: call_function: inlined call to ‘zalloc’ from ‘libdecor_decorate’
libdecor-0.2.5/src/libdecor.c:583:9: danger: ‘calloc(1, 168)’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  581|   	frame->priv = frame_priv;
#  582|   
#  583|-> 	frame_priv->ref_count = 1;
#  584|   	frame_priv->context = context;
#  585|   

Error: COMPILER_WARNING (CWE-704): [#def7]
libdecor-0.2.5/src/libdecor.c: scope_hint: In function ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1479:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1479 |         ext = strrchr(name, '.');
#      |             ^
# 1477|   	struct plugin_loader *plugin_loader;
# 1478|   
# 1479|-> 	ext = strrchr(name, '.');
# 1480|   	if (ext == NULL || strcmp(ext, ".so") != 0)
# 1481|   		return NULL;

Error: COMPILER_WARNING (CWE-704): [#def8]
libdecor-0.2.5/src/libdecor.c:1479:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1477|   	struct plugin_loader *plugin_loader;
# 1478|   
# 1479|-> 	ext = strrchr(name, '.');
# 1480|   	if (ext == NULL || strcmp(ext, ".so") != 0)
# 1481|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
libdecor-0.2.5/src/libdecor.c:1533:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 48)’
libdecor-0.2.5/src/libdecor.c:1468:1: enter_function: entry to ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1480:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1483:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1486:15: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1488:12: branch_false: following ‘false’ branch (when ‘lib’ is non-NULL)...
libdecor-0.2.5/src/libdecor.c:1493:30: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1494:12: branch_false: following ‘false’ branch (when ‘plugin_description’ is non-NULL)...
libdecor-0.2.5/src/libdecor.c:1502:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1502:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1513:15: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1513:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1518:14: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1518:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/libdecor.c:1523:20: branch_true: ...to here
libdecor-0.2.5/src/libdecor.c:1524:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1532:25: call_function: inlined call to ‘zalloc’ from ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1533:9: danger: ‘calloc(1, 48)’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/18)
# 1531|   
# 1532|   	plugin_loader = zalloc(sizeof *plugin_loader);
# 1533|-> 	plugin_loader->description = plugin_description;
# 1534|   	plugin_loader->lib = lib;
# 1535|   	plugin_loader->priority = priority;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
libdecor-0.2.5/src/libdecor.c:1725:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 96)’
libdecor-0.2.5/src/libdecor.c:1718:1: enter_function: entry to ‘libdecor_new’
libdecor-0.2.5/src/libdecor.c:1723:19: call_function: inlined call to ‘zalloc’ from ‘libdecor_new’
libdecor-0.2.5/src/libdecor.c:1725:9: danger: ‘calloc(1, 96)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 1723|   	context = zalloc(sizeof *context);
# 1724|   
# 1725|-> 	context->ref_count = 1;
# 1726|   	context->iface = iface;
# 1727|   	context->wl_display = wl_display;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1566:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘border_component’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2313:1: enter_function: entry to ‘pointer_button’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2327:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2330:13: branch_false: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2330:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2335:14: branch_false: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2335:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2338:12: branch_false: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2338:12: branch_true: following ‘true’ branch (when ‘button == 272’)...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2339:20: branch_true: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2339:20: branch_false: following ‘false’ branch (when ‘state != 1’)...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2382:25: branch_false: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2382:25: branch_true: following ‘true’ branch (when ‘state == 0’)...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2383:26: branch_true: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2382:26: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2384:25: branch_true: ...to here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2403:25: release_memory: using NULL here
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2404:25: call_function: calling ‘sync_active_component’ from ‘pointer_button’
# 1564|   		      struct border_component *border_component)
# 1565|   {
# 1566|-> 	enum component component = border_component->type;
# 1567|   	struct buffer *buffer;
# 1568|   	cairo_t *cr;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:115:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:109:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:113:24: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:115:9: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  113|   	plugin_dummy = zalloc(sizeof *plugin_dummy);
#  114|   	libdecor_plugin_init(&plugin_dummy->plugin, context, &dummy_plugin_iface);
#  115|-> 	plugin_dummy->context = context;
#  116|   
#  117|   	libdecor_notify_plugin_ready(context);

Error: CPPCHECK_WARNING (CWE-457): [#def13]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:411: error[uninitvar]: Uninitialized variable: seat->wl_pointer
#  409|   		struct cursor_output *cursor_output, *tmp;
#  410|   
#  411|-> 		if (seat->wl_pointer)
#  412|   			wl_pointer_destroy(seat->wl_pointer);
#  413|   		if (seat->wl_touch)

Error: CPPCHECK_WARNING (CWE-457): [#def14]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:423: error[uninitvar]: Uninitialized variable: cursor_output.output
#  421|   		wl_list_for_each_safe(cursor_output, tmp, &seat->cursor_outputs, link) {
#  422|   			wl_list_remove(&cursor_output->link);
#  423|-> 			free(cursor_output);
#  424|   		}
#  425|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:618:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 56)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2113:1: enter_function: entry to ‘pointer_leave’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2130:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2131:17: branch_true: ...to here
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2134:17: call_function: calling ‘draw_decoration’ from ‘pointer_leave’
#  616|   	pool = wl_shm_create_pool(plugin_gtk->wl_shm, fd, size);
#  617|   	buffer = zalloc(sizeof *buffer);
#  618|-> 	buffer->wl_buffer = wl_shm_pool_create_buffer(pool, 0,
#  619|   						      buffer_width, buffer_height,
#  620|   						      stride,

Error: CPPCHECK_WARNING (CWE-457): [#def16]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:667: error[uninitvar]: Uninitialized variable: surface_output.output
#  665|   				      &border_component->output_list, link) {
#  666|   			wl_list_remove(&surface_output->link);
#  667|-> 			free(surface_output);
#  668|   		}
#  669|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def17]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:741: error[uninitvar]: Uninitialized variable: surface_output->output
#  739|   
#  740|   	wl_list_for_each(surface_output, &cmpnt->output_list, link) {
#  741|-> 		scale = MAX(scale, surface_output->output->scale);
#  742|   	}
#  743|   	if (scale != cmpnt->scale) {

Error: CPPCHECK_WARNING (CWE-457): [#def18]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:804: error[uninitvar]: Uninitialized variable: surface_output->output
#  802|   	struct surface_output *surface_output;
#  803|   	wl_list_for_each(surface_output, list, link) {
#  804|-> 		if (surface_output->output->wl_output == wl_output) {
#  805|   			wl_list_remove(&surface_output->link);
#  806|   			free(surface_output);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:990:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buttons’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2113:1: enter_function: entry to ‘pointer_leave’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2130:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2131:17: branch_true: ...to here
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2134:17: call_function: calling ‘draw_decoration’ from ‘pointer_leave’
#  988|   {
#  989|   	(*n)++;
#  990|-> 	*array = realloc(*array, (*n) * sizeof (enum header_element));
#  991|   	(*array)[(*n)-1] = item;
#  992|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:991:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2113:1: enter_function: entry to ‘pointer_leave’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2130:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2131:17: branch_true: ...to here
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2134:17: call_function: calling ‘draw_decoration’ from ‘pointer_leave’
#  989|   	(*n)++;
#  990|   	*array = realloc(*array, (*n) * sizeof (enum header_element));
#  991|-> 	(*array)[(*n)-1] = item;
#  992|   }
#  993|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1221:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2113:1: enter_function: entry to ‘pointer_leave’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2130:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2131:17: branch_true: ...to here
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2134:17: call_function: calling ‘draw_decoration’ from ‘pointer_leave’
# 1219|   
# 1220|   	/* clear buffer */
# 1221|-> 	memset(buffer->data, 0, buffer->data_size);
# 1222|   
# 1223|   	surface = cairo_image_surface_create_for_data(

Error: CPPCHECK_WARNING (CWE-457): [#def22]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1686: error[uninitvar]: Uninitialized variable: seat->name
# 1684|   
# 1685|   	wl_list_for_each(seat, &plugin_gtk->seat_list, link) {
# 1686|-> 		if (streq(seat->name, seat_name)) {
# 1687|   			if (seat->grabbed) {
# 1688|   				fprintf(stderr, "libdecor-WARNING: Application "

Error: CPPCHECK_WARNING (CWE-457): [#def23]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1712: error[uninitvar]: Uninitialized variable: seat->name
# 1710|   
# 1711|   	wl_list_for_each(seat, &plugin_gtk->seat_list, link) {
# 1712|-> 		if (streq(seat->name, seat_name)) {
# 1713|   			if (!seat->grabbed) {
# 1714|   				fprintf(stderr, "libdecor-WARNING: Application "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1884:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1875:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1883:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1884:17: danger: ‘calloc(1, 24)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1882|   		struct cursor_output *cursor_output;
# 1883|   		cursor_output = zalloc(sizeof *cursor_output);
# 1884|-> 		cursor_output->output = wl_output_get_user_data(wl_output);
# 1885|   		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1886|   		if (update_local_cursor(seat))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1885:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1875:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1883:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1885:17: danger: ‘calloc(1, 24)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1883|   		cursor_output = zalloc(sizeof *cursor_output);
# 1884|   		cursor_output->output = wl_output_get_user_data(wl_output);
# 1885|-> 		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1886|   		if (update_local_cursor(seat))
# 1887|   			send_cursor(seat);

Error: CPPCHECK_WARNING (CWE-457): [#def26]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1901: error[uninitvar]: Uninitialized variable: cursor_output->output
# 1899|   		struct cursor_output *cursor_output, *tmp;
# 1900|   		wl_list_for_each_safe(cursor_output, tmp, &seat->cursor_outputs, link) {
# 1901|-> 			if (cursor_output->output->wl_output == wl_output) {
# 1902|   				wl_list_remove(&cursor_output->link);
# 1903|   				free(cursor_output);

Error: CPPCHECK_WARNING (CWE-457): [#def27]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1939: error[uninitvar]: Uninitialized variable: cursor_output->output
# 1937|   
# 1938|   	wl_list_for_each(cursor_output, &seat->cursor_outputs, link) {
# 1939|-> 		scale = MAX(scale, cursor_output->output->scale);
# 1940|   	}
# 1941|   

Error: CPPCHECK_WARNING (CWE-457): [#def28]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2619: error[uninitvar]: Uninitialized variables: frame_gtk.frame, frame_gtk.plugin_gtk, frame_gtk.content_width, frame_gtk.content_height, frame_gtk.window_state, frame_gtk.decoration_type, frame_gtk.title, frame_gtk.capabilities, frame_gtk.active, frame_gtk.touch_active, frame_gtk.focus, frame_gtk.grab, frame_gtk.shadow_showing, frame_gtk.shadow, frame_gtk.window, frame_gtk.header, frame_gtk.headerbar, frame_gtk.hdr_focus, frame_gtk.shadow_blur, frame_gtk.link
# 2617|   			 &output->plugin_gtk->visible_frame_list, link) {
# 2618|   		bool updated = false;
# 2619|-> 		updated |= redraw_scale(frame_gtk, &frame_gtk->shadow);
# 2620|   		if (updated)
# 2621|   			libdecor_frame_toplevel_commit(&frame_gtk->frame);

Error: CPPCHECK_WARNING (CWE-457): [#def29]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2624: error[uninitvar]: Uninitialized variables: seat.plugin_gtk, seat.name, seat.wl_seat, seat.wl_pointer, seat.wl_touch, seat.cursor_surface, seat.current_cursor, seat.cursor_scale, seat.cursor_outputs, seat.cursor_theme, seat.cursor_left_ptr, seat.pointer_focus, seat.touch_focus, seat.pointer_x, seat.pointer_y, seat.pointer_button_time_stamp, seat.touch_down_time_stamp, seat.serial, seat.grabbed, seat.link
# 2622|   	}
# 2623|   	wl_list_for_each(seat, &output->plugin_gtk->seat_list, link) {
# 2624|-> 		if (update_local_cursor(seat))
# 2625|   			send_cursor(seat);
# 2626|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def30]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2701: error[uninitvar]: Uninitialized variable: surface_output->output
# 2699|   	struct surface_output *surface_output;
# 2700|   	wl_list_for_each(surface_output, &cmpnt->output_list, link) {
# 2701|-> 		if (surface_output->output == output) {
# 2702|   			wl_list_remove(&surface_output->link);
# 2703|   			free(surface_output);

Error: CPPCHECK_WARNING (CWE-457): [#def31]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2722: error[uninitvar]: Uninitialized variable: cursor_output->output
# 2720|   		struct cursor_output *cursor_output;
# 2721|   		wl_list_for_each(cursor_output, &seat->cursor_outputs, link) {
# 2722|-> 			if (cursor_output->output == output) {
# 2723|   				wl_list_remove(&cursor_output->link);
# 2724|   				free(cursor_output);

Error: CPPCHECK_WARNING (CWE-457): [#def32]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2743: error[uninitvar]: Uninitialized variable: output->id
# 2741|   
# 2742|   	wl_list_for_each(output, &plugin_gtk->output_list, link) {
# 2743|-> 		if (output->id == name) {
# 2744|   			output_removed(plugin_gtk, output);
# 2745|   			break;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-18.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibdecor-0.2.5-2.fc44
store-results-to/tmp/tmpr46jhrda/libdecor-0.2.5-2.fc44.tar.xz
time-created2026-08-03 17:05:11
time-finished2026-08-03 17:07:19
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpr46jhrda/libdecor-0.2.5-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpr46jhrda/libdecor-0.2.5-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9