libinput-1.31.3-2.fc45

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libinput-1.31.3/src/evdev-frame.h:444:9: warning[-Wanalyzer-malloc-leak]: leak of ‘plugin_queued_event_new(frame,  device)’
libinput-1.31.3/src/libinput-plugin.c:741:1: enter_function: entry to ‘plugin_system_notify_evdev_frame’
libinput-1.31.3/src/libinput-plugin.c:754:49: call_function: calling ‘plugin_queued_event_new’ from ‘plugin_system_notify_evdev_frame’
libinput-1.31.3/src/libinput-plugin.c:754:49: return_function: returning to ‘plugin_system_notify_evdev_frame’ from ‘plugin_queued_event_new’
libinput-1.31.3/src/evdev-frame.h:444:9: danger: ‘plugin_queued_event_new(frame,  device)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  442|   evdev_frame_ref(struct evdev_frame *frame)
#  443|   {
#  444|-> 	assert(frame->refcount > 0);
#  445|   	++frame->refcount;
#  446|   	return frame;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libinput-1.31.3/src/evdev-frame.h:630:51: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.31.3/test/test-utils.c:2987:1: enter_function: entry to ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2994:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2994:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2997:17: call_function: calling ‘evdev_frame_ref’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2997:17: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_ref’
libinput-1.31.3/test/test-utils.c:2997:17: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:2998:17: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:2998:17: call_function: calling ‘evdev_frame_unref’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2998:17: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_unref’
libinput-1.31.3/test/test-utils.c:2994:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:2994:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3001:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3001:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3021:26: call_function: calling ‘evdev_frame_set’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3021:26: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_set’
libinput-1.31.3/test/test-utils.c:3022:17: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3001:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3001:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3040:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3040:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3041:26: call_function: calling ‘evdev_frame_set’ from ‘evdev_frames’
libinput-1.31.3/test/test-utils.c:3041:26: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_set’
libinput-1.31.3/test/test-utils.c:3042:17: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3042:17: branch_true: ...to here
libinput-1.31.3/src/evdev-frame.h:630:51: danger: ‘zalloc(56)’ leaks here; was allocated at [(74)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/73)
#  628|   
#  629|   	for (size_t i = 0; i < nevents; i++) {
#  630|-> 		if (evdev_usage_as_uint32_t(events[i].usage) == EVDEV_SYN_REPORT) {
#  631|   			count = i;
#  632|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libinput-1.31.3/src/evdev-tablet-pad-leds.c:233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.31.3/src/evdev-tablet-pad-leds.c:607:1: enter_function: entry to ‘pad_init_leds’
libinput-1.31.3/src/evdev-tablet-pad-leds.c:613:12: branch_false: following ‘false’ branch...
libinput-1.31.3/src/evdev-tablet-pad-leds.c:622:14: branch_false: ...to here
libinput-1.31.3/src/evdev-tablet-pad-leds.c:622:14: call_function: calling ‘pad_init_leds_from_libwacom’ from ‘pad_init_leds’
#  231|   
#  232|   	button->target_mode = mode;
#  233|-> 	list_append(&group->toggle_button_list, &button->link);
#  234|   	group->base.toggle_button_mask |= bit(button_index);
#  235|   	group->base.button_mask |= bit(button_index);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libinput-1.31.3/src/filter-custom.c:46:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/filter-custom.c:425:1: enter_function: entry to ‘create_custom_accelerator_filter’
libinput-1.31.3/src/filter-custom.c:427:40: call_function: calling ‘zalloc’ from ‘create_custom_accelerator_filter’
libinput-1.31.3/src/filter-custom.c:427:40: return_function: returning to ‘create_custom_accelerator_filter’ from ‘zalloc’
libinput-1.31.3/src/filter-custom.c:435:29: call_function: calling ‘create_custom_accel_function’ from ‘create_custom_accelerator_filter’
libinput-1.31.3/src/filter-custom.c:435:29: return_function: returning to ‘create_custom_accelerator_filter’ from ‘create_custom_accel_function’
libinput-1.31.3/src/filter-custom.c:46:13: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   44|   create_custom_accel_function(double step, const double *points, size_t npoints)
#   45|   {
#   46|-> 	if (npoints < LIBINPUT_ACCEL_NPOINTS_MIN ||
#   47|   	    npoints > LIBINPUT_ACCEL_NPOINTS_MAX)
#   48|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libinput-1.31.3/src/filter-flat.c:152:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.31.3/src/filter-flat.c:144:1: enter_function: entry to ‘create_pointer_accelerator_filter_flat’
libinput-1.31.3/src/filter-flat.c:148:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_flat’
libinput-1.31.3/src/filter-flat.c:148:18: return_function: returning to ‘create_pointer_accelerator_filter_flat’ from ‘zalloc’
libinput-1.31.3/src/filter-flat.c:152:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  150|   	filter->dpi = dpi;
#  151|   
#  152|-> 	return &filter->base;
#  153|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libinput-1.31.3/src/filter-tablet.c:163:50: warning[-Wanalyzer-malloc-leak]: leak of ‘create_tablet_filter_flat(xres,  yres)’
libinput-1.31.3/src/filter-tablet.c:170:1: enter_function: entry to ‘create_pointer_accelerator_filter_tablet’
libinput-1.31.3/src/filter-tablet.c:174:18: call_function: calling ‘create_tablet_filter_flat’ from ‘create_pointer_accelerator_filter_tablet’
libinput-1.31.3/src/filter-tablet.c:174:18: return_function: returning to ‘create_pointer_accelerator_filter_tablet’ from ‘create_tablet_filter_flat’
libinput-1.31.3/src/filter-tablet.c:163:50: danger: ‘create_tablet_filter_flat(xres,  yres)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  161|   	filter->xres = xres;
#  162|   	filter->yres = yres;
#  163|-> 	filter->xres_scale = DEFAULT_MOUSE_DPI / (25.4 * xres);
#  164|   	filter->yres_scale = DEFAULT_MOUSE_DPI / (25.4 * yres);
#  165|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libinput-1.31.3/src/filter-touchpad-flat.c:155:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.31.3/src/filter-touchpad-flat.c:147:1: enter_function: entry to ‘create_pointer_accelerator_filter_touchpad_flat’
libinput-1.31.3/src/filter-touchpad-flat.c:151:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_touchpad_flat’
libinput-1.31.3/src/filter-touchpad-flat.c:151:18: return_function: returning to ‘create_pointer_accelerator_filter_touchpad_flat’ from ‘zalloc’
libinput-1.31.3/src/filter-touchpad-flat.c:155:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  153|   	filter->dpi = dpi;
#  154|   
#  155|-> 	return &filter->base;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libinput-1.31.3/src/filter-trackpoint-flat.c:168:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.31.3/src/filter-trackpoint-flat.c:160:1: enter_function: entry to ‘create_pointer_accelerator_filter_trackpoint_flat’
libinput-1.31.3/src/filter-trackpoint-flat.c:164:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_trackpoint_flat’
libinput-1.31.3/src/filter-trackpoint-flat.c:164:18: return_function: returning to ‘create_pointer_accelerator_filter_trackpoint_flat’ from ‘zalloc’
libinput-1.31.3/src/filter-trackpoint-flat.c:168:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  166|   	filter->multiplier = multiplier;
#  167|   
#  168|-> 	return &filter->base;
#  169|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libinput-1.31.3/src/libinput-plugin-tablet-double-tool.c:351:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput-plugin-tablet-double-tool.c:338:1: enter_function: entry to ‘double_tool_plugin_device_added’
libinput-1.31.3/src/libinput-plugin-tablet-double-tool.c:349:36: call_function: calling ‘zalloc’ from ‘double_tool_plugin_device_added’
libinput-1.31.3/src/libinput-plugin-tablet-double-tool.c:349:36: return_function: returning to ‘double_tool_plugin_device_added’ from ‘zalloc’
libinput-1.31.3/src/libinput-plugin-tablet-double-tool.c:351:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  349|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  350|   	pd->device = libinput_device_ref(device);
#  351|-> 	list_take_append(&plugin->devices, pd, link);
#  352|   }
#  353|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libinput-1.31.3/src/libinput-plugin-tablet-forced-tool.c:235:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput-plugin-tablet-forced-tool.c:224:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.31.3/src/libinput-plugin-tablet-forced-tool.c:233:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.31.3/src/libinput-plugin-tablet-forced-tool.c:233:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.31.3/src/libinput-plugin-tablet-forced-tool.c:235:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  233|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  234|   	pd->device = libinput_device_ref(device);
#  235|-> 	list_take_append(&plugin->devices, pd, link);
#  236|   }
#  237|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
libinput-1.31.3/src/libinput-util.h:84:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘evdev’
libinput-1.31.3/test/test-switch.c:831:1: enter_function: entry to ‘lid_update_hw_on_key_multiple_keyboards’
libinput-1.31.3/test/test-switch.c:840:12: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-switch.c:836:28: call_function: inlined call to ‘libevdev_freep’ from ‘lid_update_hw_on_key_multiple_keyboards’
#   82|   #endif
#   83|   #ifdef LIBEVDEV_ATTRIBUTE_PRINTF
#   84|-> DEFINE_FREE_CLEANUP_FUNC(libevdev);
#   85|   #endif
#   86|   DEFINE_UNREF_CLEANUP_FUNC(libinput);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libinput-1.31.3/src/libinput.c:1753:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.31.3/src/libinput.c:2845:1: enter_function: entry to ‘tablet_notify_proximity’
libinput-1.31.3/src/libinput.c:2856:27: call_function: calling ‘zalloc’ from ‘tablet_notify_proximity’
libinput-1.31.3/src/libinput.c:2856:27: return_function: returning to ‘tablet_notify_proximity’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:1753:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
# 1751|   libinput_tablet_tool_ref(struct libinput_tablet_tool *tool)
# 1752|   {
# 1753|-> 	tool->refcount++;
# 1754|   	return tool;
# 1755|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libinput-1.31.3/src/libinput.c:2391:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.31.3/src/libinput.c:2382:1: enter_function: entry to ‘notify_added_device’
libinput-1.31.3/src/libinput.c:2389:30: call_function: calling ‘zalloc’ from ‘notify_added_device’
libinput-1.31.3/src/libinput.c:2389:30: return_function: returning to ‘notify_added_device’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2391:9: danger: ‘zalloc(16)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
# 2389|   	added_device_event = zalloc(sizeof *added_device_event);
# 2390|   
# 2391|-> 	post_base_event(device, LIBINPUT_EVENT_DEVICE_ADDED, &added_device_event->base);
# 2392|   
# 2393|   #ifdef __clang_analyzer__

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libinput-1.31.3/src/libinput.c:2410:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.31.3/src/libinput.c:2401:1: enter_function: entry to ‘notify_removed_device’
libinput-1.31.3/src/libinput.c:2408:32: call_function: calling ‘zalloc’ from ‘notify_removed_device’
libinput-1.31.3/src/libinput.c:2408:32: return_function: returning to ‘notify_removed_device’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2410:9: danger: ‘zalloc(16)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
# 2408|   	removed_device_event = zalloc(sizeof *removed_device_event);
# 2409|   
# 2410|-> 	post_base_event(device,
# 2411|   			LIBINPUT_EVENT_DEVICE_REMOVED,
# 2412|   			&removed_device_event->base);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libinput-1.31.3/src/libinput.c:2475:26: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2462:1: enter_function: entry to ‘keyboard_notify_key’
libinput-1.31.3/src/libinput.c:2470:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2473:21: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2473:21: call_function: calling ‘zalloc’ from ‘keyboard_notify_key’
libinput-1.31.3/src/libinput.c:2473:21: return_function: returning to ‘keyboard_notify_key’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2475:26: call_function: calling ‘update_seat_key_count’ from ‘keyboard_notify_key’
libinput-1.31.3/src/libinput.c:2475:26: return_function: returning to ‘keyboard_notify_key’ from ‘update_seat_key_count’
libinput-1.31.3/src/libinput.c:2475:26: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
# 2473|   	key_event = zalloc(sizeof *key_event);
# 2474|   
# 2475|-> 	seat_key_count = update_seat_key_count(device->seat, keycode, state);
# 2476|   
# 2477|   	*key_event = (struct libinput_event_keyboard){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libinput-1.31.3/src/libinput.c:2506:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2488:1: enter_function: entry to ‘pointer_notify_motion’
libinput-1.31.3/src/libinput.c:2495:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2498:24: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2498:24: call_function: calling ‘zalloc’ from ‘pointer_notify_motion’
libinput-1.31.3/src/libinput.c:2498:24: return_function: returning to ‘pointer_notify_motion’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2506:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
# 2504|   	};
# 2505|   
# 2506|-> 	post_device_event(device,
# 2507|   			  time,
# 2508|   			  LIBINPUT_EVENT_POINTER_MOTION,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libinput-1.31.3/src/libinput.c:2529:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2513:1: enter_function: entry to ‘pointer_notify_motion_absolute’
libinput-1.31.3/src/libinput.c:2519:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2522:33: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2522:33: call_function: calling ‘zalloc’ from ‘pointer_notify_motion_absolute’
libinput-1.31.3/src/libinput.c:2522:33: return_function: returning to ‘pointer_notify_motion_absolute’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2529:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
# 2527|   	};
# 2528|   
# 2529|-> 	post_device_event(device,
# 2530|   			  time,
# 2531|   			  LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libinput-1.31.3/src/libinput.c:2549:29: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2536:1: enter_function: entry to ‘pointer_notify_button’
libinput-1.31.3/src/libinput.c:2544:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2547:24: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2547:24: call_function: calling ‘zalloc’ from ‘pointer_notify_button’
libinput-1.31.3/src/libinput.c:2547:24: return_function: returning to ‘pointer_notify_button’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2549:29: call_function: calling ‘update_seat_button_count’ from ‘pointer_notify_button’
libinput-1.31.3/src/libinput.c:2549:29: return_function: returning to ‘pointer_notify_button’ from ‘update_seat_button_count’
libinput-1.31.3/src/libinput.c:2549:29: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
# 2547|   	button_event = zalloc(sizeof *button_event);
# 2548|   
# 2549|-> 	seat_button_count = update_seat_button_count(device->seat, button, state);
# 2550|   
# 2551|   	*button_event = (struct libinput_event_pointer){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libinput-1.31.3/src/libinput.c:2590:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2565:1: enter_function: entry to ‘pointer_notify_axis_finger’
libinput-1.31.3/src/libinput.c:2574:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2577:22: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2577:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.31.3/src/libinput.c:2577:22: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2578:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.31.3/src/libinput.c:2578:29: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2590:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
# 2588|   	*axis_event_legacy = *axis_event;
# 2589|   
# 2590|-> 	post_device_event(device,
# 2591|   			  time,
# 2592|   			  LIBINPUT_EVENT_POINTER_SCROLL_FINGER,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libinput-1.31.3/src/libinput.c:2626:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2601:1: enter_function: entry to ‘pointer_notify_axis_continuous’
libinput-1.31.3/src/libinput.c:2610:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2613:22: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2613:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.31.3/src/libinput.c:2613:22: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2614:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.31.3/src/libinput.c:2614:29: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2626:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
# 2624|   	*axis_event_legacy = *axis_event;
# 2625|   
# 2626|-> 	post_device_event(device,
# 2627|   			  time,
# 2628|   			  LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libinput-1.31.3/src/libinput.c:2660:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2637:1: enter_function: entry to ‘pointer_notify_axis_legacy_wheel’
libinput-1.31.3/src/libinput.c:2646:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2649:22: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2649:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_legacy_wheel’
libinput-1.31.3/src/libinput.c:2649:22: return_function: returning to ‘pointer_notify_axis_legacy_wheel’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2660:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
# 2658|   	};
# 2659|   
# 2660|-> 	post_device_event(device, time, LIBINPUT_EVENT_POINTER_AXIS, &axis_event->base);
# 2661|   }
# 2662|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libinput-1.31.3/src/libinput.c:2687:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.31.3/src/libinput.c:2664:1: enter_function: entry to ‘pointer_notify_axis_wheel’
libinput-1.31.3/src/libinput.c:2672:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2675:22: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2675:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_wheel’
libinput-1.31.3/src/libinput.c:2675:22: return_function: returning to ‘pointer_notify_axis_wheel’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2687:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
# 2685|   	};
# 2686|   
# 2687|-> 	post_device_event(device,
# 2688|   			  time,
# 2689|   			  LIBINPUT_EVENT_POINTER_SCROLL_WHEEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libinput-1.31.3/src/libinput.c:2716:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2696:1: enter_function: entry to ‘touch_notify_touch_down’
libinput-1.31.3/src/libinput.c:2704:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2707:23: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2707:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_down’
libinput-1.31.3/src/libinput.c:2707:23: return_function: returning to ‘touch_notify_touch_down’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2716:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
# 2714|   	};
# 2715|   
# 2716|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_DOWN, &touch_event->base);
# 2717|   }
# 2718|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libinput-1.31.3/src/libinput.c:2740:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2720:1: enter_function: entry to ‘touch_notify_touch_motion’
libinput-1.31.3/src/libinput.c:2728:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2731:23: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2731:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_motion’
libinput-1.31.3/src/libinput.c:2731:23: return_function: returning to ‘touch_notify_touch_motion’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2740:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
# 2738|   	};
# 2739|   
# 2740|-> 	post_device_event(device,
# 2741|   			  time,
# 2742|   			  LIBINPUT_EVENT_TOUCH_MOTION,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libinput-1.31.3/src/libinput.c:2765:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2747:1: enter_function: entry to ‘touch_notify_touch_up’
libinput-1.31.3/src/libinput.c:2754:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2757:23: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2757:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_up’
libinput-1.31.3/src/libinput.c:2757:23: return_function: returning to ‘touch_notify_touch_up’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2765:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 2763|   	};
# 2764|   
# 2765|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_UP, &touch_event->base);
# 2766|   }
# 2767|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libinput-1.31.3/src/libinput.c:2787:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2769:1: enter_function: entry to ‘touch_notify_touch_cancel’
libinput-1.31.3/src/libinput.c:2776:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2779:23: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2779:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_cancel’
libinput-1.31.3/src/libinput.c:2779:23: return_function: returning to ‘touch_notify_touch_cancel’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2787:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 2785|   	};
# 2786|   
# 2787|-> 	post_device_event(device,
# 2788|   			  time,
# 2789|   			  LIBINPUT_EVENT_TOUCH_CANCEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libinput-1.31.3/src/libinput.c:2807:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/src/libinput.c:2794:1: enter_function: entry to ‘touch_notify_frame’
libinput-1.31.3/src/libinput.c:2798:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:2801:23: branch_true: ...to here
libinput-1.31.3/src/libinput.c:2801:23: call_function: calling ‘zalloc’ from ‘touch_notify_frame’
libinput-1.31.3/src/libinput.c:2801:23: return_function: returning to ‘touch_notify_frame’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2807:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
# 2805|   	};
# 2806|   
# 2807|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_FRAME, &touch_event->base);
# 2808|   }
# 2809|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libinput-1.31.3/src/libinput.c:2924:29: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.31.3/src/libinput.c:2909:1: enter_function: entry to ‘tablet_notify_button’
libinput-1.31.3/src/libinput.c:2922:24: call_function: calling ‘zalloc’ from ‘tablet_notify_button’
libinput-1.31.3/src/libinput.c:2922:24: return_function: returning to ‘tablet_notify_button’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:2924:29: call_function: calling ‘update_seat_button_count’ from ‘tablet_notify_button’
libinput-1.31.3/src/libinput.c:2924:29: return_function: returning to ‘tablet_notify_button’ from ‘update_seat_button_count’
libinput-1.31.3/src/libinput.c:2924:29: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/5)
# 2922|   	button_event = zalloc(sizeof *button_event);
# 2923|   
# 2924|-> 	seat_button_count = update_seat_button_count(device->seat, button, state);
# 2925|   
# 2926|   	*button_event = (struct libinput_event_tablet_tool){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libinput-1.31.3/src/libinput.c:3071:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.31.3/src/libinput.c:3062:1: enter_function: entry to ‘tablet_pad_notify_key’
libinput-1.31.3/src/libinput.c:3069:21: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_key’
libinput-1.31.3/src/libinput.c:3069:21: return_function: returning to ‘tablet_pad_notify_key’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:3071:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5)
# 3069|   	key_event = zalloc(sizeof *key_event);
# 3070|   
# 3071|-> 	*key_event = (struct libinput_event_tablet_pad){
# 3072|   		.time = time,
# 3073|   		.key.code = key,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libinput-1.31.3/src/libinput.c:3101:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.31.3/src/libinput.c:3084:1: enter_function: entry to ‘gesture_notify’
libinput-1.31.3/src/libinput.c:3096:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:3099:25: branch_true: ...to here
libinput-1.31.3/src/libinput.c:3099:25: call_function: calling ‘zalloc’ from ‘gesture_notify’
libinput-1.31.3/src/libinput.c:3099:25: return_function: returning to ‘gesture_notify’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:3101:9: danger: ‘zalloc(80)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7)
# 3099|   	gesture_event = zalloc(sizeof *gesture_event);
# 3100|   
# 3101|-> 	*gesture_event = (struct libinput_event_gesture){
# 3102|   		.time = time,
# 3103|   		.finger_count = finger_count,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libinput-1.31.3/src/libinput.c:3239:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.31.3/src/libinput.c:3221:1: enter_function: entry to ‘switch_notify_toggle’
libinput-1.31.3/src/libinput.c:3228:12: branch_true: following ‘true’ branch...
libinput-1.31.3/src/libinput.c:3231:24: branch_true: ...to here
libinput-1.31.3/src/libinput.c:3231:24: call_function: calling ‘zalloc’ from ‘switch_notify_toggle’
libinput-1.31.3/src/libinput.c:3231:24: return_function: returning to ‘switch_notify_toggle’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:3239:9: danger: ‘zalloc(32)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
# 3237|   	};
# 3238|   
# 3239|-> 	post_device_event(device,
# 3240|   			  time,
# 3241|   			  LIBINPUT_EVENT_SWITCH_TOGGLE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libinput-1.31.3/src/libinput.c:3548:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.31.3/src/libinput.c:2974:1: enter_function: entry to ‘tablet_pad_notify_dial’
libinput-1.31.3/src/libinput.c:2983:22: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_dial’
libinput-1.31.3/src/libinput.c:2983:22: return_function: returning to ‘tablet_pad_notify_dial’ from ‘zalloc’
libinput-1.31.3/src/libinput.c:3548:16: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
# 3546|   libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *group)
# 3547|   {
# 3548|-> 	return group->current_mode;
# 3549|   }
# 3550|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libinput-1.31.3/src/util-bits.h:262:17: warning[-Wanalyzer-malloc-leak]: leak of ‘m.mask’
libinput-1.31.3/src/util-bits.h:408:1: enter_function: entry to ‘_infmask_from_bits’
libinput-1.31.3/src/util-bits.h:411:9: call_function: calling ‘infmask_set_bit’ from ‘_infmask_from_bits’
libinput-1.31.3/src/util-bits.h:411:9: return_function: returning to ‘_infmask_from_bits’ from ‘infmask_set_bit’
libinput-1.31.3/src/util-bits.h:417:16: branch_true: following ‘true’ branch (when ‘v != 4294967295’)...
libinput-1.31.3/src/util-bits.h:418:17: branch_true: ...to here
libinput-1.31.3/src/util-bits.h:418:17: call_function: calling ‘infmask_set_bit’ from ‘_infmask_from_bits’
#  260|   	size_t required = _infmask_size_for_bit(bit);
#  261|   	if (required > mask->nmasks) {
#  262|-> 		mask->mask = realloc(mask->mask, required * sizeof(bitmask_t));
#  263|   		/* Zero out the new memory */
#  264|   		for (size_t i = mask->nmasks; i < required; i++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
libinput-1.31.3/src/util-bits.h:265:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/src/util-bits.h:408:1: enter_function: entry to ‘_infmask_from_bits’
libinput-1.31.3/src/util-bits.h:410:23: release_memory: ‘m.mask’ is NULL
libinput-1.31.3/src/util-bits.h:411:9: call_function: calling ‘infmask_set_bit’ from ‘_infmask_from_bits’
#  263|   		/* Zero out the new memory */
#  264|   		for (size_t i = mask->nmasks; i < required; i++)
#  265|-> 			mask->mask[i] = bitmask_new();
#  266|   		mask->nmasks = required;
#  267|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
libinput-1.31.3/src/util-bits.h:265:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘empty.mask’
libinput-1.31.3/test/test-utils.c:3227:1: enter_function: entry to ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3230:27: release_memory: ‘empty.mask’ is NULL
libinput-1.31.3/test/test-utils.c:3231:9: call_function: calling ‘infmask_is_empty’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3231:9: return_function: returning to ‘infmask_test’ from ‘infmask_is_empty’
libinput-1.31.3/test/test-utils.c:3231:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3237:28: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:3237:28: release_memory: ‘empty.mask’ is NULL
libinput-1.31.3/test/test-utils.c:3238:9: call_function: calling ‘infmask_set_bit’ from ‘infmask_test’
#  263|   		/* Zero out the new memory */
#  264|   		for (size_t i = mask->nmasks; i < required; i++)
#  265|-> 			mask->mask[i] = bitmask_new();
#  266|   		mask->nmasks = required;
#  267|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
libinput-1.31.3/src/util-bits.h:265:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘high.mask’
libinput-1.31.3/test/test-utils.c:3227:1: enter_function: entry to ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3230:27: release_memory: ‘empty.mask’ is NULL
libinput-1.31.3/test/test-utils.c:3231:9: call_function: calling ‘infmask_is_empty’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3231:9: return_function: returning to ‘infmask_test’ from ‘infmask_is_empty’
libinput-1.31.3/test/test-utils.c:3231:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3237:28: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:3237:28: release_memory: ‘empty.mask’ is NULL
libinput-1.31.3/test/test-utils.c:3238:9: call_function: calling ‘infmask_set_bit’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3238:9: return_function: returning to ‘infmask_test’ from ‘infmask_set_bit’
libinput-1.31.3/test/test-utils.c:3238:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3239:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3239:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3240:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3240:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3241:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3241:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3242:9: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:3242:9: call_function: calling ‘infmask_is_empty’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3242:9: return_function: returning to ‘infmask_test’ from ‘infmask_is_empty’
libinput-1.31.3/test/test-utils.c:3242:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3243:9: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:3243:9: call_function: calling ‘infmask_clear_bit’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3243:9: return_function: returning to ‘infmask_test’ from ‘infmask_clear_bit’
libinput-1.31.3/test/test-utils.c:3243:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3244:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3244:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3245:9: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:3245:9: call_function: calling ‘infmask_is_empty’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3245:9: return_function: returning to ‘infmask_test’ from ‘infmask_is_empty’
libinput-1.31.3/test/test-utils.c:3249:30: call_function: calling ‘infmask_from_bit’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3249:30: return_function: returning to ‘infmask_test’ from ‘infmask_from_bit’
libinput-1.31.3/test/test-utils.c:3250:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3251:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3251:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3252:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3252:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3253:9: call_function: inlined call to ‘infmask_reset’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3256:31: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3256:31: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3257:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3258:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3258:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3259:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3259:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3260:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3260:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3261:9: call_function: inlined call to ‘infmask_bit_is_set’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3261:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3262:9: call_function: inlined call to ‘infmask_reset’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3265:26: release_memory: ‘empty.mask’ is NULL
libinput-1.31.3/test/test-utils.c:3266:9: call_function: calling ‘infmask_set_bit’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3266:9: return_function: returning to ‘infmask_test’ from ‘infmask_set_bit’
libinput-1.31.3/test/test-utils.c:3270:9: call_function: calling ‘infmask_clear_bit’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3270:9: return_function: returning to ‘infmask_test’ from ‘infmask_clear_bit’
libinput-1.31.3/test/test-utils.c:3275:27: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3275:27: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3276:27: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3276:27: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3277:27: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3277:27: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3279:9: call_function: calling ‘infmask_any’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3279:9: return_function: returning to ‘infmask_test’ from ‘infmask_any’
libinput-1.31.3/test/test-utils.c:3279:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3280:9: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:3280:9: call_function: calling ‘infmask_all’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3280:9: return_function: returning to ‘infmask_test’ from ‘infmask_all’
libinput-1.31.3/test/test-utils.c:3280:9: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:3281:9: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:3281:9: call_function: calling ‘infmask_all’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3281:9: return_function: returning to ‘infmask_test’ from ‘infmask_all’
libinput-1.31.3/test/test-utils.c:3282:9: call_function: calling ‘infmask_any’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3282:9: return_function: returning to ‘infmask_test’ from ‘infmask_any’
libinput-1.31.3/test/test-utils.c:3282:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:3284:9: call_function: inlined call to ‘infmask_reset’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3289:28: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3289:28: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3290:28: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3290:28: return_function: returning to ‘infmask_test’ from ‘_infmask_from_bits’
libinput-1.31.3/test/test-utils.c:3291:9: call_function: calling ‘infmask_merge’ from ‘infmask_test’
libinput-1.31.3/test/test-utils.c:3291:9: return_function: returning to ‘infmask_test’ from ‘infmask_merge’
libinput-1.31.3/test/test-utils.c:3299:28: call_function: calling ‘_infmask_from_bits’ from ‘infmask_test’
#  263|   		/* Zero out the new memory */
#  264|   		for (size_t i = mask->nmasks; i < required; i++)
#  265|-> 			mask->mask[i] = bitmask_new();
#  266|   		mask->nmasks = required;
#  267|   	}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def37]
libinput-1.31.3/src/util-files.c:43:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.31.3/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.31.3/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:103:25: branch_true: ...to here
libinput-1.31.3/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:104:59: branch_true: ...to here
libinput-1.31.3/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   41|   {
#   42|   	list_remove(&f->link);
#   43|-> 	free(f->name);
#   44|   	free(f->directory);
#   45|   	free(f);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def38]
libinput-1.31.3/src/util-files.c:44:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.31.3/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.31.3/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:103:25: branch_true: ...to here
libinput-1.31.3/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:104:59: branch_true: ...to here
libinput-1.31.3/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   42|   	list_remove(&f->link);
#   43|   	free(f->name);
#   44|-> 	free(f->directory);
#   45|   	free(f);
#   46|   }

Error: GCC_ANALYZER_WARNING (CWE-590): [#def39]
libinput-1.31.3/src/util-files.c:45:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘f’ which points to memory on the stack
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.31.3/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.31.3/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:103:25: branch_true: ...to here
libinput-1.31.3/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:104:59: branch_true: ...to here
libinput-1.31.3/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   43|   	free(f->name);
#   44|   	free(f->directory);
#   45|-> 	free(f);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libinput-1.31.3/src/util-files.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
#   69|   		f->name = safe_strdup(entry->d_name);
#   70|   		f->directory = safe_strdup(directory);
#   71|-> 		list_append(list, &f->link);
#   72|   	}
#   73|   }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def41]
libinput-1.31.3/src/util-files.c:104:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.31.3/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.31.3/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:103:25: branch_true: ...to here
libinput-1.31.3/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:104:59: branch_true: ...to here
libinput-1.31.3/src/util-files.c:104:43: danger: out-of-bounds read from byte 16 till byte 23 but ‘files’ ends at byte 16
#  102|   			struct file *new_file;
#  103|   			list_for_each_safe(new_file, &new_files, link) {
#  104|-> 				if (streq(old_file->name, new_file->name)) {
#  105|   					file_destroy(new_file);
#  106|   					break;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def42]
libinput-1.31.3/src/util-files.c:104:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.31.3/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.31.3/src/util-files.c:89:12: branch_false: ...to here
libinput-1.31.3/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:97:29: branch_true: ...to here
libinput-1.31.3/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.31.3/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.31.3/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:103:25: branch_true: ...to here
libinput-1.31.3/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-files.c:104:59: branch_true: ...to here
libinput-1.31.3/src/util-files.c:104:59: danger: out-of-bounds read from byte 16 till byte 23 but ‘new_files’ ends at byte 16
#  102|   			struct file *new_file;
#  103|   			list_for_each_safe(new_file, &new_files, link) {
#  104|-> 				if (streq(old_file->name, new_file->name)) {
#  105|   					file_destroy(new_file);
#  106|   					break;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def43]
libinput-1.31.3/src/util-files.c:120:9: warning[-Wanalyzer-infinite-loop]: infinite loop
libinput-1.31.3/src/util-files.c:120:9: danger: infinite loop here
libinput-1.31.3/src/util-files.c:120:9: branch_true: if it ever follows ‘true’ branch, it will always do so...
libinput-1.31.3/src/util-files.c:121:17: branch_true: ...to here
#  118|   	size_t nfiles = 0;
#  119|   	struct file *f;
#  120|-> 	list_for_each(f, &files, link) {
#  121|   		nfiles++;
#  122|   	}

Error: COMPILER_WARNING (CWE-457): [#def44]
libinput-1.31.3/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘abs’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.31.3/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.31.3/test/litest.c:2072:42: note: ‘abs’ was declared here
# 2072 |         _autofree_ struct input_absinfo *abs;
#      |                                          ^~~
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: COMPILER_WARNING (CWE-457): [#def45]
libinput-1.31.3/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘events’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.31.3/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.31.3/test/litest.c:2073:25: note: ‘events’ was declared here
# 2073 |         _autofree_ int *events;
#      |                         ^~~~~~
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: COMPILER_WARNING (CWE-457): [#def46]
libinput-1.31.3/src/util-mem.h:131:20: warning[-Wmaybe-uninitialized]: ‘udev_device’ may be used uninitialized
#  131 |                 if (*_p)                                        \
#      |                    ^
libinput-1.31.3/test/litest.c: scope_hint: In function ‘grab_device’
libinput-1.31.3/test/litest.c:672:32: note: ‘udev_device’ was declared here
#  672 |         _unref_(udev_device) * udev_device;
#      |                                ^~~~~~~~~~~
#  129|   #define DEFINE_UNREF_CLEANUP_FUNC(_type)		\
#  130|   	static inline void _type##_unrefp(struct _type **_p) {	\
#  131|-> 		if (*_p)					\
#  132|   			_type##_unref(*_p);			\
#  133|   	}							\

Error: GCC_ANALYZER_WARNING (CWE-457): [#def47]
libinput-1.31.3/src/util-prop-parsers.c:416:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&evs’
libinput-1.31.3/src/util-prop-parsers.c:364:1: enter_function: entry to ‘parse_evcode_property’
libinput-1.31.3/src/util-prop-parsers.c:374:12: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:378:30: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:382:25: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:397:20: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:398:30: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:398:30: call_function: calling ‘parse_evcode_string’ from ‘parse_evcode_property’
libinput-1.31.3/src/util-prop-parsers.c:398:30: return_function: returning to ‘parse_evcode_property’ from ‘parse_evcode_string’
libinput-1.31.3/src/util-prop-parsers.c:398:28: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:411:17: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:378:30: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:382:25: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:397:20: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:398:30: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:398:30: call_function: calling ‘parse_evcode_string’ from ‘parse_evcode_property’
libinput-1.31.3/src/util-prop-parsers.c:398:30: return_function: returning to ‘parse_evcode_property’ from ‘parse_evcode_string’
libinput-1.31.3/src/util-prop-parsers.c:398:28: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:411:17: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:378:30: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-prop-parsers.c:382:25: branch_true: ...to here
libinput-1.31.3/src/util-prop-parsers.c:397:20: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:402:30: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:404:28: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:405:29: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:404:29: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:406:37: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:404:29: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:407:29: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:404:29: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:407:48: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:404:29: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:423:1: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:378:30: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-prop-parsers.c:416:9: branch_false: ...to here
libinput-1.31.3/src/util-prop-parsers.c:416:9: danger: use of uninitialized value ‘&evs’ here
#  414|   	}
#  415|   
#  416|-> 	memcpy(events, evs, ncodes * sizeof *events);
#  417|   	*nevents = ncodes;
#  418|   	rc = true;

Error: CPPCHECK_WARNING (CWE-476): [#def48]
libinput-1.31.3/src/util-stringbuf.h:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   40|   stringbuf_init(struct stringbuf *b)
#   41|   {
#   42|-> 	b->len = 0;
#   43|   	b->sz = 64;
#   44|   	b->data = calloc(1, b->sz);

Error: CPPCHECK_WARNING (CWE-476): [#def49]
libinput-1.31.3/src/util-stringbuf.h:43: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   41|   {
#   42|   	b->len = 0;
#   43|-> 	b->sz = 64;
#   44|   	b->data = calloc(1, b->sz);
#   45|   }

Error: CPPCHECK_WARNING (CWE-476): [#def50]
libinput-1.31.3/src/util-stringbuf.h:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   42|   	b->len = 0;
#   43|   	b->sz = 64;
#   44|-> 	b->data = calloc(1, b->sz);
#   45|   }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libinput-1.31.3/src/util-strings.c:145:20: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(*<unknown>)’
libinput-1.31.3/src/util-strings.c:132:1: enter_function: entry to ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:136:9: branch_true: following ‘true’ branch (when ‘argc >= 0’)...
libinput-1.31.3/src/util-strings.c:137:9: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:137:9: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:139:12: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:139:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libinput-1.31.3/src/util-strings.c:142:23: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:142:16: call_function: calling ‘zalloc’ from ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:142:16: return_function: returning to ‘strv_from_argv’ from ‘zalloc’
libinput-1.31.3/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.31.3/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.31.3/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.31.3/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.31.3/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.31.3/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.31.3/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.31.3/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.31.3/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.31.3/src/util-strings.c:145:20: danger: ‘safe_strdup(*<unknown>)’ leaks here; was allocated at [(54)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/53)
#  143|   	for (int i = 0; i < argc; i++) {
#  144|   		char *copy = safe_strdup(argv[i]);
#  145|-> 		if (!copy) {
#  146|   			strv_free(strv);
#  147|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libinput-1.31.3/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpdir_create(0)’
libinput-1.31.3/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: return_function: returning to ‘tmpdir_test’ from ‘tmpdir_create’
libinput-1.31.3/test/test-utils.c:124:31: call_function: calling ‘safe_strdup’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:124:31: return_function: returning to ‘tmpdir_test’ from ‘safe_strdup’
libinput-1.31.3/test/test-utils.c:126:39: call_function: calling ‘strdup_printf’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:126:39: return_function: returning to ‘tmpdir_test’ from ‘strdup_printf’
libinput-1.31.3/test/test-utils.c:127:17: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:127:17: branch_true: ...to here
libinput-1.31.3/src/util-strings.h:153:16: danger: ‘tmpdir_create(0)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libinput-1.31.3/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.31.3/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.31.3/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libinput-1.31.3/src/util-strings.h:365:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.31.3/src/util-strings.c:172:1: enter_function: entry to ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:174:9: branch_true: following ‘true’ branch (when ‘in’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:175:9: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:175:9: branch_true: following ‘true’ branch (when ‘separators’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:177:21: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:179:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-strings.c:180:17: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:179:16: branch_false: following ‘false’ branch...
libinput-1.31.3/src/util-strings.c:182:12: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:182:12: branch_false: following ‘false’ branch (when ‘nelems != 0’)...
libinput-1.31.3/src/util-strings.c:188:16: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:189:23: call_function: calling ‘zalloc’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:189:23: return_function: returning to ‘strv_from_string’ from ‘zalloc’
libinput-1.31.3/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.31.3/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.31.3/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:195:30: acquire_memory: allocated here
libinput-1.31.3/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.31.3/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.31.3/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.31.3/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.31.3/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.31.3/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.31.3/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.31.3/src/util-strings.c:196:20: branch_true: following ‘true’ branch (when ‘copy’ is NULL)...
libinput-1.31.3/src/util-strings.c:197:25: call_function: inlined call to ‘strv_free’ from ‘strv_from_string’
#  363|   	}
#  364|   
#  365|-> 	free(strv);
#  366|   }
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def55]
libinput-1.31.3/test/litest-main.c:170:25: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libinput-1.31.3/test/litest-main.c:157:1: enter_function: entry to ‘setup_tests’
libinput-1.31.3/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.31.3/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.31.3/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.31.3/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.31.3/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.31.3/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.31.3/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.31.3/test/litest-main.c:170:25: danger: out-of-bounds read from byte 16 till byte 23 but ‘__start_test_collection_section’ ends at byte 16
#  168|   		s = zalloc(sizeof(*s));
#  169|   		s->name = safe_strdup(
#  170|-> 			c->name); /* NOLINT(clang-analyzer-security.ArrayBound) */
#  171|   
#  172|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def56]
libinput-1.31.3/test/litest-main.c:176:17: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libinput-1.31.3/test/litest-main.c:157:1: enter_function: entry to ‘setup_tests’
libinput-1.31.3/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.31.3/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.31.3/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.31.3/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.31.3/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.31.3/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.31.3/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.31.3/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.31.3/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.31.3/test/litest-main.c:176:17: danger: out-of-bounds read from byte 24 till byte 31 but ‘__start_test_collection_section’ ends at byte 16
#  174|   
#  175|   		current_suite = s;
#  176|-> 		c->setup();
#  177|   		current_suite = NULL;
#  178|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libinput-1.31.3/test/litest.c:846:19: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.31.3/test/litest.c:867:1: enter_function: entry to ‘litest_add_tcase_for_device_with_params’
libinput-1.31.3/test/litest.c:884:9: call_function: calling ‘litest_parameters_permutations’ from ‘litest_add_tcase_for_device_with_params’
#  844|   
#  845|   	t = zalloc(sizeof(*t));
#  846|-> 	t->name = safe_strdup(data->funcname);
#  847|   	t->func = data->func;
#  848|   	if (data->dev) {

Error: COMPILER_WARNING (CWE-252): [#def58]
libinput-1.31.3/test/test-plugins-lua.c: scope_hint: In function ‘_litest_write_plugin’
libinput-1.31.3/test/test-plugins-lua.c:48:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   48 |                 write(fd, content, strlen(content));
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   46|   
#   47|   	if (content) {
#   48|-> 		write(fd, content, strlen(content));
#   49|   		fsync(fd);
#   50|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
libinput-1.31.3/test/test-plugins-lua.c:574:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:561:1: enter_function: entry to ‘lua_frame_handler’
libinput-1.31.3/test/test-plugins-lua.c:563:37: call_function: calling ‘tmpdir_create’ from ‘lua_frame_handler’
libinput-1.31.3/test/test-plugins-lua.c:563:37: return_function: returning to ‘lua_frame_handler’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:574:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  572|   		"libinput:connect(\"new-evdev-device\", function(device) device:connect(\"evdev-frame\", frame_handler) end)\n";
#  573|   
#  574|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  575|   	_litest_context_destroy_ struct libinput *li =
#  576|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
libinput-1.31.3/test/test-plugins-lua.c:640:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:627:1: enter_function: entry to ‘lua_device_info’
libinput-1.31.3/test/test-plugins-lua.c:629:37: call_function: calling ‘tmpdir_create’ from ‘lua_device_info’
libinput-1.31.3/test/test-plugins-lua.c:629:37: return_function: returning to ‘lua_device_info’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:640:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  638|   		"libinput:connect(\"new-evdev-device\", info_printer)\n";
#  639|   
#  640|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  641|   	_litest_context_destroy_ struct libinput *li =
#  642|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def61]
libinput-1.31.3/test/test-plugins-lua.c:678:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:661:1: enter_function: entry to ‘lua_set_absinfo’
libinput-1.31.3/test/test-plugins-lua.c:663:37: call_function: calling ‘tmpdir_create’ from ‘lua_set_absinfo’
libinput-1.31.3/test/test-plugins-lua.c:663:37: return_function: returning to ‘lua_set_absinfo’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:678:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  676|   		"libinput:connect(\"new-evdev-device\", absinfo_setter)\n";
#  677|   
#  678|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  679|   	_litest_context_destroy_ struct libinput *li =
#  680|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
libinput-1.31.3/test/test-plugins-lua.c:763:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:726:1: enter_function: entry to ‘lua_enable_disable_evdev_usage’
libinput-1.31.3/test/test-plugins-lua.c:728:37: call_function: calling ‘tmpdir_create’ from ‘lua_enable_disable_evdev_usage’
libinput-1.31.3/test/test-plugins-lua.c:728:37: return_function: returning to ‘lua_enable_disable_evdev_usage’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:763:31: danger: dereference of NULL ‘tmpdir_create(0)’
#  761|   		"libinput:connect(\"new-evdev-device\", f)\n";
#  762|   
#  763|-> 	_autofree_ char *p1 = litest_write_plugin(tmpdir->path, lua1);
#  764|   	_autofree_ char *p2 = litest_write_plugin(tmpdir->path, lua2);
#  765|   	_litest_context_destroy_ struct libinput *li =

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
libinput-1.31.3/test/test-plugins-lua.c:814:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:801:1: enter_function: entry to ‘lua_udev_properties’
libinput-1.31.3/test/test-plugins-lua.c:803:37: call_function: calling ‘tmpdir_create’ from ‘lua_udev_properties’
libinput-1.31.3/test/test-plugins-lua.c:803:37: return_function: returning to ‘lua_udev_properties’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:814:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  812|   		"libinput:connect(\"new-evdev-device\", prop_printer)\n";
#  813|   
#  814|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  815|   	_litest_context_destroy_ struct libinput *li =
#  816|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
libinput-1.31.3/test/test-plugins-lua.c:889:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:859:1: enter_function: entry to ‘lua_append_prepend_frame’
libinput-1.31.3/test/test-plugins-lua.c:863:37: call_function: calling ‘tmpdir_create’ from ‘lua_append_prepend_frame’
libinput-1.31.3/test/test-plugins-lua.c:863:37: return_function: returning to ‘lua_append_prepend_frame’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:864:32: call_function: calling ‘strdup_printf’ from ‘lua_append_prepend_frame’
libinput-1.31.3/test/test-plugins-lua.c:864:32: return_function: returning to ‘lua_append_prepend_frame’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:889:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  887|   		in_timer ? "" : "-- ",
#  888|   		append ? "append" : "prepend");
#  889|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  890|   	_litest_context_destroy_ struct libinput *li =
#  891|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def65]
libinput-1.31.3/test/test-plugins-lua.c:946:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:926:1: enter_function: entry to ‘lua_ignore_unsupported_codes’
libinput-1.31.3/test/test-plugins-lua.c:928:37: call_function: calling ‘tmpdir_create’ from ‘lua_ignore_unsupported_codes’
libinput-1.31.3/test/test-plugins-lua.c:928:37: return_function: returning to ‘lua_ignore_unsupported_codes’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:929:32: call_function: calling ‘strdup_printf’ from ‘lua_ignore_unsupported_codes’
libinput-1.31.3/test/test-plugins-lua.c:929:32: return_function: returning to ‘lua_ignore_unsupported_codes’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:946:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  944|   		"    device:connect(\"evdev-frame\", frame_handler)\n"
#  945|   		"end)\n");
#  946|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  947|   	_litest_context_destroy_ struct libinput *li =
#  948|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def66]
libinput-1.31.3/test/test-plugins-lua.c:991:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:975:1: enter_function: entry to ‘lua_disable_button_debounce’
libinput-1.31.3/test/test-plugins-lua.c:978:37: call_function: calling ‘tmpdir_create’ from ‘lua_disable_button_debounce’
libinput-1.31.3/test/test-plugins-lua.c:978:37: return_function: returning to ‘lua_disable_button_debounce’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:979:32: call_function: calling ‘strdup_printf’ from ‘lua_disable_button_debounce’
libinput-1.31.3/test/test-plugins-lua.c:979:32: return_function: returning to ‘lua_disable_button_debounce’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:991:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  989|   		when == DEVICE_NEW ? "" : "--",
#  990|   		when == FIRST_FRAME ? "" : "--");
#  991|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  992|   	_litest_context_destroy_ struct libinput *li =
#  993|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
libinput-1.31.3/test/test-plugins-lua.c:1051:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:1034:1: enter_function: entry to ‘lua_disable_touchpad_jump_detection’
libinput-1.31.3/test/test-plugins-lua.c:1037:37: call_function: calling ‘tmpdir_create’ from ‘lua_disable_touchpad_jump_detection’
libinput-1.31.3/test/test-plugins-lua.c:1037:37: return_function: returning to ‘lua_disable_touchpad_jump_detection’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:1038:32: call_function: calling ‘strdup_printf’ from ‘lua_disable_touchpad_jump_detection’
libinput-1.31.3/test/test-plugins-lua.c:1038:32: return_function: returning to ‘lua_disable_touchpad_jump_detection’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:1051:33: danger: dereference of NULL ‘tmpdir_create(0)’
# 1049|   		when == FIRST_FRAME ? "" : "-- ");
# 1050|   
# 1051|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
# 1052|   	_litest_context_destroy_ struct libinput *li =
# 1053|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def68]
libinput-1.31.3/test/test-plugins-lua.c:1098:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:1082:1: enter_function: entry to ‘lua_disable_wheel_debouncing’
libinput-1.31.3/test/test-plugins-lua.c:1085:37: call_function: calling ‘tmpdir_create’ from ‘lua_disable_wheel_debouncing’
libinput-1.31.3/test/test-plugins-lua.c:1085:37: return_function: returning to ‘lua_disable_wheel_debouncing’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:1086:32: call_function: calling ‘strdup_printf’ from ‘lua_disable_wheel_debouncing’
libinput-1.31.3/test/test-plugins-lua.c:1086:32: return_function: returning to ‘lua_disable_wheel_debouncing’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:1098:33: danger: dereference of NULL ‘tmpdir_create(0)’
# 1096|   		when == DEVICE_NEW ? "" : "--",
# 1097|   		when == FIRST_FRAME ? "" : "--");
# 1098|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
# 1099|   	_litest_context_destroy_ struct libinput *li =
# 1100|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def69]
libinput-1.31.3/test/test-plugins-lua.c:1157:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:1137:1: enter_function: entry to ‘lua_remove_plugin_on_timeout’
libinput-1.31.3/test/test-plugins-lua.c:1140:37: call_function: calling ‘tmpdir_create’ from ‘lua_remove_plugin_on_timeout’
libinput-1.31.3/test/test-plugins-lua.c:1140:37: return_function: returning to ‘lua_remove_plugin_on_timeout’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:1141:32: call_function: calling ‘strdup_printf’ from ‘lua_remove_plugin_on_timeout’
libinput-1.31.3/test/test-plugins-lua.c:1141:32: return_function: returning to ‘lua_remove_plugin_on_timeout’ from ‘strdup_printf’
libinput-1.31.3/test/test-plugins-lua.c:1157:33: danger: dereference of NULL ‘tmpdir_create(0)’
# 1155|   		when == FIRST_FRAME ? "" : "--");
# 1156|   
# 1157|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
# 1158|   	_litest_context_destroy_ struct libinput *li =
# 1159|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def70]
libinput-1.31.3/test/test-plugins-lua.c:1251:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-plugins-lua.c:1244:1: enter_function: entry to ‘lua_reject_precompiled_files’
libinput-1.31.3/test/test-plugins-lua.c:1246:37: call_function: calling ‘tmpdir_create’ from ‘lua_reject_precompiled_files’
libinput-1.31.3/test/test-plugins-lua.c:1246:37: return_function: returning to ‘lua_reject_precompiled_files’ from ‘tmpdir_create’
libinput-1.31.3/test/test-plugins-lua.c:1251:33: danger: dereference of NULL ‘tmpdir_create(0)’
# 1249|   	 * Binary (pre-compiled) Lua files must be rejected by the
# 1250|   	 * plugin loader for security reasons. */
# 1251|-> 	_autofree_ char *path = strdup_printf("%s/10-binary-plugin.lua", tmpdir->path);
# 1252|   	_autoclose_ int fd = open(path, O_WRONLY | O_CREAT, 0644);
# 1253|   	litest_assert_errno_success(fd);

Error: CPPCHECK_WARNING (CWE-476): [#def71]
libinput-1.31.3/test/test-quirks.c:66: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#   64|   		assert(fp);
#   65|   #endif
#   66|-> 		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|   		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def72]
libinput-1.31.3/test/test-quirks.c:66:26: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’ where non-null expected
libinput-1.31.3/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.31.3/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   64|   		assert(fp);
#   65|   #endif
#   66|-> 		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|   		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
libinput-1.31.3/test/test-quirks.c:67:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.31.3/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.31.3/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
libinput-1.31.3/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.31.3/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.31.3/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
libinput-1.31.3/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.31.3/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.31.3/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def76]
libinput-1.31.3/test/test-quirks.c:746:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/test/test-quirks.c:737:1: enter_function: entry to ‘quirks_parse_name_invalid’
libinput-1.31.3/test/test-quirks.c:745:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-quirks.c:746:43: branch_true: ...to here
libinput-1.31.3/test/test-quirks.c:746:43: call_function: calling ‘data_dir_new’ from ‘quirks_parse_name_invalid’
libinput-1.31.3/test/test-quirks.c:746:43: return_function: returning to ‘quirks_parse_name_invalid’ from ‘data_dir_new’
libinput-1.31.3/test/test-quirks.c:746:38: call_function: inlined call to ‘data_dir_destroyp’ from ‘quirks_parse_name_invalid’
libinput-1.31.3/test/test-quirks.c:746:38: call_function: inlined call to ‘data_dir_destroyp’ from ‘quirks_parse_name_invalid’
libinput-1.31.3/test/test-quirks.c:745:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-quirks.c:746:43: branch_true: ...to here
libinput-1.31.3/test/test-quirks.c:746:43: danger: out-of-bounds read from byte 8 till byte 15 but ‘quirks_file’ ends at byte 8
#  744|   
#  745|   	ARRAY_FOR_EACH(quirks_file, qf) {
#  746|-> 		_destroy_(data_dir) *dd = data_dir_new(*qf);
#  747|   
#  748|   		_unref_(quirks_context) *ctx =

Error: GCC_ANALYZER_WARNING (CWE-126): [#def77]
libinput-1.31.3/test/test-quirks.c:806:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.31.3/test/test-quirks.c:797:1: enter_function: entry to ‘quirks_parse_uniq_invalid’
libinput-1.31.3/test/test-quirks.c:805:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-quirks.c:806:43: branch_true: ...to here
libinput-1.31.3/test/test-quirks.c:806:43: call_function: calling ‘data_dir_new’ from ‘quirks_parse_uniq_invalid’
libinput-1.31.3/test/test-quirks.c:806:43: return_function: returning to ‘quirks_parse_uniq_invalid’ from ‘data_dir_new’
libinput-1.31.3/test/test-quirks.c:806:38: call_function: inlined call to ‘data_dir_destroyp’ from ‘quirks_parse_uniq_invalid’
libinput-1.31.3/test/test-quirks.c:806:38: call_function: inlined call to ‘data_dir_destroyp’ from ‘quirks_parse_uniq_invalid’
libinput-1.31.3/test/test-quirks.c:805:9: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-quirks.c:806:43: branch_true: ...to here
libinput-1.31.3/test/test-quirks.c:806:43: danger: out-of-bounds read from byte 8 till byte 15 but ‘quirks_file’ ends at byte 8
#  804|   
#  805|   	ARRAY_FOR_EACH(quirks_file, qf) {
#  806|-> 		_destroy_(data_dir) *dd = data_dir_new(*qf);
#  807|   
#  808|   		_unref_(quirks_context) *ctx =

Error: CPPCHECK_WARNING (CWE-457): [#def78]
libinput-1.31.3/test/test-tablet.c:7608: warning[uninitvar]: Uninitialized variables: tool.link, tool.serial, tool.tool_id, tool.type, tool.refcount, tool.user_data, tool.last_device, tool.pressure, tool.eraser_button, tool.config, tool.last_tablet_id
# 7606|   	}
# 7607|   
# 7608|-> 	if (!libinput_tablet_tool_config_eraser_button_get_modes(tool)) {
# 7609|   		libinput_tablet_tool_unref(tool);
# 7610|   		return LITEST_NOT_APPLICABLE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
libinput-1.31.3/test/test-utils.c:124:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: return_function: returning to ‘tmpdir_test’ from ‘tmpdir_create’
libinput-1.31.3/test/test-utils.c:124:43: danger: dereference of NULL ‘tmpdir_create(0)’
#  122|   		_destroy_(tmpdir) *tmpdir = tmpdir_create(NULL);
#  123|   
#  124|-> 		tmpdir_path = safe_strdup(tmpdir->path);
#  125|   
#  126|   		_autofree_ char *f1 = strdup_printf("%s/wipeme", tmpdir_path);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def80]
libinput-1.31.3/test/test-utils.c:130:18: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libinput-1.31.3/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:45: return_function: returning to ‘tmpdir_test’ from ‘tmpdir_create’
libinput-1.31.3/test/test-utils.c:124:31: call_function: calling ‘safe_strdup’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:124:31: return_function: returning to ‘tmpdir_test’ from ‘safe_strdup’
libinput-1.31.3/test/test-utils.c:126:39: call_function: calling ‘strdup_printf’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:126:39: return_function: returning to ‘tmpdir_test’ from ‘strdup_printf’
libinput-1.31.3/test/test-utils.c:127:17: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:126:34: call_function: inlined call to ‘_free_ptr_’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:36: call_function: inlined call to ‘tmpdir_destroyp’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:122:36: call_function: inlined call to ‘tmpdir_destroyp’ from ‘tmpdir_test’
libinput-1.31.3/test/test-utils.c:130:18: danger: argument 1 (‘safe_strdup(*<unknown>.path)’) NULL where non-null expected
#  128|   	}
#  129|   	struct stat st;
#  130|-> 	int rc = stat(tmpdir_path, &st) < 0 ? -errno : 0;
#  131|   	litest_assert_int_eq(rc, -ENOENT);
#  132|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def81]
libinput-1.31.3/test/test-utils.c:138:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup("/tmp/litest_find_files_test.XXXXXX")’ where non-null expected
libinput-1.31.3/test/test-utils.c:137:36: acquire_memory: this call could return NULL
libinput-1.31.3/test/test-utils.c:138:9: danger: argument 1 (‘strdup("/tmp/litest_find_files_test.XXXXXX")’) from [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  136|   {
#  137|   	_autofree_ char *dirname = strdup("/tmp/litest_find_files_test.XXXXXX");
#  138|-> 	mkdtemp(dirname);
#  139|   
#  140|   	_autofree_ char *d1 = strdup_printf("%s/d1", dirname);

Error: COMPILER_WARNING (CWE-252): [#def82]
libinput-1.31.3/test/test-utils.c: scope_hint: In function ‘find_files_test’
libinput-1.31.3/test/test-utils.c:138:9: warning[-Wunused-result]: ignoring return value of ‘mkdtemp’ declared with attribute ‘warn_unused_result’
#  138 |         mkdtemp(dirname);
#      |         ^~~~~~~~~~~~~~~~
#  136|   {
#  137|   	_autofree_ char *dirname = strdup("/tmp/litest_find_files_test.XXXXXX");
#  138|-> 	mkdtemp(dirname);
#  139|   
#  140|   	_autofree_ char *d1 = strdup_printf("%s/d1", dirname);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
libinput-1.31.3/test/test-utils.c:1961:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.31.3/test/test-utils.c:1924:1: enter_function: entry to ‘double_array_from_string_test’
libinput-1.31.3/test/test-utils.c:1954:16: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:1956:33: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:1956:33: call_function: calling ‘double_array_from_string’ from ‘double_array_from_string_test’
libinput-1.31.3/test/test-utils.c:1956:33: return_function: returning to ‘double_array_from_string_test’ from ‘double_array_from_string’
libinput-1.31.3/test/test-utils.c:1959:38: branch_true: following ‘true’ branch (when ‘idx < _a’)...
libinput-1.31.3/test/test-utils.c:1960:25: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:1960:25: branch_true: following ‘true’ branch...
libinput-1.31.3/test/test-utils.c:1960:25: branch_true: ...to here
libinput-1.31.3/test/test-utils.c:1961:25: danger: dereference of NULL ‘double_array_from_string(*t.string, *t.delim, & len) + idx * 8’
# 1959|   		for (size_t idx = 0; idx < len; idx++) {
# 1960|   			litest_assert_ptr_notnull(array);
# 1961|-> 			litest_assert_double_eq(array[idx], t->array[idx]);
# 1962|   		}
# 1963|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
libinput-1.31.3/test/test-utils.c:2937:43: warning[-Wanalyzer-fd-leak]: leak of file descriptor
libinput-1.31.3/test/test-utils.c:2916:1: enter_function: entry to ‘attribute_cleanup’
libinput-1.31.3/test/test-utils.c:2923:45: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.31.3/test/test-utils.c:2923:45: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.31.3/test/test-utils.c:2927:43: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.31.3/test/test-utils.c:2927:43: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.31.3/test/test-utils.c:2932:17: branch_false: following ‘false’ branch...
libinput-1.31.3/test/test-utils.c:2937:43: branch_false: ...to here
libinput-1.31.3/test/test-utils.c:2937:43: danger: leaks here
# 2935|   		litest_assert_int_eq(badfd, -1);
# 2936|   
# 2937|-> 		_autoclose_ int stealfd = open("/proc/self/cmdline", O_RDONLY);
# 2938|   		steal_fd(&stealfd);
# 2939|   		litest_assert_int_eq(stealfd, -1);

Error: COMPILER_WARNING (CWE-252): [#def85]
libinput-1.31.3/tools/libinput-record.c: scope_hint: In function ‘signalfd_dispatch’
libinput-1.31.3/tools/libinput-record.c:2115:15: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 2115 |         (void)read(fd, &fdsi, sizeof(fdsi));
#      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2113|   	struct signalfd_siginfo fdsi;
# 2114|   
# 2115|-> 	(void)read(fd, &fdsi, sizeof(fdsi));
# 2116|   
# 2117|   	ctx->stop = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libinput-1.31.3/tools/libinput-record.c:2495:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.31.3/tools/libinput-record.c:2458:1: enter_function: entry to ‘init_hidraw’
libinput-1.31.3/tools/libinput-record.c:2462:9: branch_true: following ‘true’ branch...
libinput-1.31.3/tools/libinput-record.c:2470:40: branch_true: ...to here
libinput-1.31.3/tools/libinput-record.c:2475:24: branch_true: following ‘true’ branch...
libinput-1.31.3/tools/libinput-record.c:2480:44: branch_true: ...to here
libinput-1.31.3/tools/libinput-record.c:2480:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.31.3/tools/libinput-record.c:2480:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.31.3/tools/libinput-record.c:2488:28: branch_false: following ‘false’ branch...
libinput-1.31.3/tools/libinput-record.c:2491:34: branch_false: ...to here
libinput-1.31.3/tools/libinput-record.c:2491:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.31.3/tools/libinput-record.c:2491:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.31.3/tools/libinput-record.c:2493:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.31.3/tools/libinput-record.c:2493:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.31.3/tools/libinput-record.c:2495:25: danger: ‘zalloc(40)’ leaks here; was allocated at [(24)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/23)
# 2493|   			hidraw->name = safe_strdup(entry->d_name);
# 2494|   			hidraw->device = dev;
# 2495|-> 			list_insert(&dev->hidraw_devices, &hidraw->link);
# 2496|   		}
# 2497|   		closedir(dir);

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-169.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-namelibinput-1.31.3-2.fc45
store-results-to/tmp/tmpcdztkk7n/libinput-1.31.3-2.fc45.tar.xz
time-created2026-08-03 17:28:55
time-finished2026-08-03 17:30:50
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpcdztkk7n/libinput-1.31.3-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcdztkk7n/libinput-1.31.3-2.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9