Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libinput-1.29.1/src/evdev-frame.h:630:51: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.29.1/test/test-utils.c:2864:1: enter_function: entry to ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2871:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2871:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2874:17: call_function: calling ‘evdev_frame_ref’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2874:17: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_ref’
libinput-1.29.1/test/test-utils.c:2874:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2875:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2875:17: call_function: calling ‘evdev_frame_unref’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2875:17: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_unref’
libinput-1.29.1/test/test-utils.c:2871:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2871:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2878:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2878:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2898:26: call_function: calling ‘evdev_frame_set’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2898:26: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_set’
libinput-1.29.1/test/test-utils.c:2899:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2878:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2878:39: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2917:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2917:47: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2918:26: call_function: calling ‘evdev_frame_set’ from ‘evdev_frames’
libinput-1.29.1/test/test-utils.c:2918:26: return_function: returning to ‘evdev_frames’ from ‘evdev_frame_set’
libinput-1.29.1/test/test-utils.c:2919:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2919:17: branch_true: ...to here
libinput-1.29.1/src/evdev-frame.h:630:51: danger: ‘zalloc(56)’ leaks here; was allocated at [(74)](sarif:/runs/0/results/12/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): [#def2]
libinput-1.29.1/src/libinput-plugin-button-debounce.c:748:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:722:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:725:12: branch_false: following ‘false’ branch...
libinput-1.29.1/src/libinput-plugin-button-debounce.c:728:45: branch_false: ...to here
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:748:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.29.1/src/libinput-plugin-button-debounce.c:748:22: danger: ‘zalloc(72)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  746|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  747|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  748|-> 	pd->device = libinput_device_ref(device);
#  749|   	pd->parent = plugin;
#  750|   	pd->state = DEBOUNCE_STATE_IS_UP;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libinput-1.29.1/src/libinput-plugin-button-debounce.c:753:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:722:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:725:12: branch_false: following ‘false’ branch...
libinput-1.29.1/src/libinput-plugin-button-debounce.c:728:45: branch_false: ...to here
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:753:17: throw: if ‘libinput_device_get_sysname’ throws an exception...
libinput-1.29.1/src/libinput-plugin-button-debounce.c:753:17: danger: ‘zalloc(72)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  751|   
#  752|   	_autofree_ char *timer1_name =
#  753|-> 		strdup_printf("debounce-%s", libinput_device_get_sysname(device));
#  754|   	_autofree_ char *timer2_name =
#  755|   		strdup_printf("debounce-short-%s", libinput_device_get_sysname(device));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:189:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:179:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:188:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:188:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:189:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:189:22: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  187|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  188|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  189|-> 	pd->device = libinput_device_ref(device);
#  190|   	list_take_append(&plugin->devices, pd, link);
#  191|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:190:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:179:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:188:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:188:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.29.1/src/libinput-plugin-tablet-forced-tool.c:190:9: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  188|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  189|   	pd->device = libinput_device_ref(device);
#  190|-> 	list_take_append(&plugin->devices, pd, link);
#  191|   }
#  192|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libinput-1.29.1/src/quirks.c:457:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.29.1/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.1/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.1/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.1/src/quirks.c:1265:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1265:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.29.1/src/quirks.c:1267:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#  455|   	copy = safe_strdup(modalias);
#  456|   
#  457|-> 	udev_device_unref(udev_device);
#  458|   	udev_unref(udev);
#  459|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libinput-1.29.1/src/quirks.c:458:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.29.1/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.1/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.1/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.1/src/quirks.c:1265:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1265:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.29.1/src/quirks.c:1267:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#  456|   
#  457|   	udev_device_unref(udev_device);
#  458|-> 	udev_unref(udev);
#  459|   
#  460|   	return copy;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
libinput-1.29.1/src/quirks.c:588:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
libinput-1.29.1/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.1/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.1/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.1/src/quirks.c:1262:9: throw: if ‘list_init’ throws an exception...
libinput-1.29.1/src/quirks.c:1254:34: call_function: inlined call to ‘quirks_context_unrefp’ from ‘quirks_init_subsystem’
#  586|   	struct property *p;
#  587|   
#  588|-> 	free(s->name);
#  589|   	free(s->match.name);
#  590|   	free(s->match.uniq);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libinput-1.29.1/src/quirks.c:1262:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.29.1/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.1/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.1/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.1/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.1/src/quirks.c:1262:9: throw: if ‘list_init’ throws an exception...
libinput-1.29.1/src/quirks.c:1254:34: call_function: inlined call to ‘quirks_context_unrefp’ from ‘quirks_init_subsystem’
# 1260|   	ctx->log_type = log_type;
# 1261|   	ctx->libinput = libinput;
# 1262|-> 	list_init(&ctx->quirks);
# 1263|   	list_init(&ctx->sections);
# 1264|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def10]
libinput-1.29.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tmpdir_path’
libinput-1.29.1/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:120:26: call_function: inlined call to ‘_free_ptr_’ from ‘tmpdir_test’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
libinput-1.29.1/src/util-mem.h:91:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/cmdline", 0)’
libinput-1.29.1/test/test-utils.c:2793:1: enter_function: entry to ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2800:45: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2800:45: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.29.1/test/test-utils.c:2804:43: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2804:43: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.29.1/test/test-utils.c:2808:38: acquire_resource: opened here
libinput-1.29.1/test/test-utils.c:2809:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2814:43: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2808:33: call_function: inlined call to ‘_close_fd_’ from ‘attribute_cleanup’
#   89|   {
#   90|   	if (*fd != -1)
#   91|-> 		close(*fd);
#   92|   }
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libinput-1.29.1/src/util-multivalue.h:173:13: warning[-Wanalyzer-malloc-leak]: leak of ‘multivalue_as_str(&v)’
libinput-1.29.1/test/test-utils.c:2562:1: enter_function: entry to ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2565:39: call_function: calling ‘multivalue_new_string’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2565:39: return_function: returning to ‘multivalue_test’ from ‘multivalue_new_string’
libinput-1.29.1/test/test-utils.c:2567:17: call_function: calling ‘streq’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2567:17: return_function: returning to ‘multivalue_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2570:17: call_function: calling ‘multivalue_extract_typed’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2570:17: return_function: returning to ‘multivalue_test’ from ‘multivalue_extract_typed’
libinput-1.29.1/test/test-utils.c:2571:17: call_function: calling ‘streq’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2571:17: return_function: returning to ‘multivalue_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2572:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2572:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2573:17: call_function: calling ‘multivalue_extract’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2573:17: return_function: returning to ‘multivalue_test’ from ‘multivalue_extract’
libinput-1.29.1/test/test-utils.c:2574:17: call_function: calling ‘streq’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2574:17: return_function: returning to ‘multivalue_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2575:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2575:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2579:17: call_function: calling ‘streq’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2579:17: return_function: returning to ‘multivalue_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2584:29: call_function: calling ‘multivalue_as_str’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2584:29: return_function: returning to ‘multivalue_test’ from ‘multivalue_as_str’
libinput-1.29.1/test/test-utils.c:2585:17: call_function: calling ‘streq’ from ‘multivalue_test’
libinput-1.29.1/test/test-utils.c:2585:17: return_function: returning to ‘multivalue_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2585:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2585:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2585:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/src/util-multivalue.h:173:13: danger: ‘multivalue_as_str(&v)’ leaks here; was allocated at [(54)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/53)
#  171|   	char *str;
#  172|   
#  173|-> 	if (v->name[0])
#  174|   		return safe_strdup(v->name);
#  175|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libinput-1.29.1/src/util-strings.h:60:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(*t.string)’
libinput-1.29.1/test/test-utils.c:2074:1: enter_function: entry to ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: call_function: calling ‘streq’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2095:17: return_function: returning to ‘strsanitize_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2095:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2095:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2095:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/src/util-strings.h:60:13: danger: ‘str_sanitize(*t.string)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#   58|   {
#   59|   	/* one NULL, one not NULL is always false */
#   60|-> 	if (str1 && str2)
#   61|   		return strcmp(str1, str2) == 0;
#   62|   	return str1 == str2;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def14]
libinput-1.29.1/src/util-strings.h:61:24: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘str1’ where non-null expected
libinput-1.29.1/test/test-utils.c:2074:1: enter_function: entry to ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: call_function: calling ‘streq’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2095:17: return_function: returning to ‘strsanitize_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2096:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: call_function: calling ‘streq’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2095:17: return_function: returning to ‘strsanitize_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2095:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2096:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: call_function: calling ‘streq’ from ‘strsanitize_test’
#   59|   	/* one NULL, one not NULL is always false */
#   60|   	if (str1 && str2)
#   61|-> 		return strcmp(str1, str2) == 0;
#   62|   	return str1 == str2;
#   63|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libinput-1.29.1/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:722:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:725:12: branch_false: following ‘false’ branch...
libinput-1.29.1/src/libinput-plugin-button-debounce.c:728:45: branch_false: ...to here
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:747:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:753:17: call_function: calling ‘strdup_printf’ from ‘debounce_plugin_device_added’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:753:17: return_function: returning to ‘debounce_plugin_device_added’ from ‘strdup_printf’
libinput-1.29.1/src/libinput-plugin-button-debounce.c:755:17: throw: if ‘libinput_device_get_sysname’ throws an exception...
libinput-1.29.1/src/util-strings.h:153:16: danger: ‘zalloc(72)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libinput-1.29.1/src/util-strings.h:448:30: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(npairs * 16)’
libinput-1.29.1/src/util-strings.h:429:1: enter_function: entry to ‘kv_double_from_string’
libinput-1.29.1/src/util-strings.h:437:12: branch_false: following ‘false’ branch...
libinput-1.29.1/src/util-strings.h:443:12: branch_false: following ‘false’ branch...
libinput-1.29.1/src/util-strings.h:446:18: call_function: calling ‘zalloc’ from ‘kv_double_from_string’
libinput-1.29.1/src/util-strings.h:446:18: return_function: returning to ‘kv_double_from_string’ from ‘zalloc’
libinput-1.29.1/src/util-strings.h:448:30: branch_true: following ‘true’ branch...
libinput-1.29.1/src/util-strings.h:449:35: branch_true: ...to here
libinput-1.29.1/src/util-strings.h:451:29: throw: if ‘strv_from_string’ throws an exception...
libinput-1.29.1/src/util-strings.h:448:30: danger: ‘zalloc(npairs * 16)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/9)
#  446|   	result = zalloc(npairs * sizeof *result);
#  447|   
#  448|-> 	for (size_t idx = 0; idx < npairs; idx++) {
#  449|   		char *pair = pairs[idx];
#  450|   		size_t nelem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libinput-1.29.1/src/util-strings.h:492:15: warning[-Wanalyzer-malloc-leak]: leak of ‘strstrip(*t.string, *t.what)’
libinput-1.29.1/test/test-utils.c:1984:1: enter_function: entry to ‘strstrip_test’
libinput-1.29.1/test/test-utils.c:2014:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2016:23: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2016:23: call_function: calling ‘strstrip’ from ‘strstrip_test’
libinput-1.29.1/test/test-utils.c:2016:23: return_function: returning to ‘strstrip_test’ from ‘strstrip’
libinput-1.29.1/test/test-utils.c:2014:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2016:23: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2016:23: call_function: calling ‘strstrip’ from ‘strstrip_test’
libinput-1.29.1/test/test-utils.c:2016:23: return_function: returning to ‘strstrip_test’ from ‘strstrip’
libinput-1.29.1/test/test-utils.c:2017:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2017:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2017:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/src/util-strings.h:492:15: danger: ‘strstrip(*t.string, *t.what)’ leaks here; was allocated at [(35)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/34)
#  490|   	char *str, *last;
#  491|   
#  492|-> 	str = safe_strdup(&input[strspn(input, what)]);
#  493|   
#  494|   	last = str;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libinput-1.29.1/src/util-strings.h:559:34: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(*t.string)’
libinput-1.29.1/test/test-utils.c:2074:1: enter_function: entry to ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2093:50: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2094:35: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2094:35: call_function: calling ‘str_sanitize’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2094:35: return_function: returning to ‘strsanitize_test’ from ‘str_sanitize’
libinput-1.29.1/test/test-utils.c:2095:17: call_function: calling ‘streq’ from ‘strsanitize_test’
libinput-1.29.1/test/test-utils.c:2095:17: return_function: returning to ‘strsanitize_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2095:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2095:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2095:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/src/util-strings.h:559:34: danger: ‘str_sanitize(*t.string)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/14)
#  557|   	size_t slen = strlen(str);
#  558|   	slen = min(slen, 512);
#  559|-> 	char *sanitized = zalloc(2 * slen + 1);
#  560|   	const char *src = str;
#  561|   	char *dst = sanitized;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libinput-1.29.1/test/litest-main.c:160:39: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.1/test/litest-main.c:152:1: enter_function: entry to ‘setup_tests’
libinput-1.29.1/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.1/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.1/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.1/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.1/test/litest-main.c:160:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.29.1/test/litest-main.c:160:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.29.1/test/litest-main.c:162:17: throw: if ‘list_init’ throws an exception...
libinput-1.29.1/test/litest-main.c:160:39: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  158|   		struct suite *s;
#  159|   		s = zalloc(sizeof(*s));
#  160|-> 		s->name = safe_strdup(c->name);
#  161|   
#  162|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def20]
libinput-1.29.1/test/litest-main.c:160:39: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libinput-1.29.1/test/litest-main.c:152:1: enter_function: entry to ‘setup_tests’
libinput-1.29.1/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.1/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.1/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.1/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.1/test/litest-main.c:160:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.29.1/test/litest-main.c:160:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.29.1/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.1/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.1/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.1/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.1/test/litest-main.c:160:39: danger: out-of-bounds read from byte 16 till byte 23 but ‘__start_test_collection_section’ ends at byte 16
#  158|   		struct suite *s;
#  159|   		s = zalloc(sizeof(*s));
#  160|-> 		s->name = safe_strdup(c->name);
#  161|   
#  162|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libinput-1.29.1/test/litest.c:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.1/test/litest.c:4839:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.29.1/test/litest.c:4841:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.29.1/test/litest.c:4841:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.29.1/test/litest.c:4842:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
#  265|   			   const char *comparison)
#  266|   {
#  267|-> 	litest_log("FAILED COMPARISON: %s\n", comparison);
#  268|   	litest_log("in %s() (%s:%d)\n", func, file, line);
#  269|   	litest_backtrace(func);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libinput-1.29.1/test/litest.c:2168:48: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.1/test/litest.c:4839:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.29.1/test/litest.c:4841:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.29.1/test/litest.c:4841:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.29.1/test/litest.c:4842:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
# 2166|   litest_context_set_user_data(struct libinput *li, void *data)
# 2167|   {
# 2168|-> 	struct litest_user_data *litest_data = libinput_get_user_data(li);
# 2169|   	litest_assert_ptr_notnull(litest_data);
# 2170|   	litest_data->private = data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
libinput-1.29.1/test/test-utils.c:124:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.29.1/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:45: return_function: returning to ‘tmpdir_test’ from ‘tmpdir_create’
libinput-1.29.1/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): [#def24]
libinput-1.29.1/test/test-utils.c:130:18: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libinput-1.29.1/test/test-utils.c:118:1: enter_function: entry to ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:45: call_function: calling ‘tmpdir_create’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:45: return_function: returning to ‘tmpdir_test’ from ‘tmpdir_create’
libinput-1.29.1/test/test-utils.c:124:31: call_function: calling ‘safe_strdup’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:124:31: return_function: returning to ‘tmpdir_test’ from ‘safe_strdup’
libinput-1.29.1/test/test-utils.c:126:39: call_function: calling ‘strdup_printf’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:126:39: return_function: returning to ‘tmpdir_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:127:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:126:34: call_function: inlined call to ‘_free_ptr_’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:36: call_function: inlined call to ‘tmpdir_destroyp’ from ‘tmpdir_test’
libinput-1.29.1/test/test-utils.c:122:36: call_function: inlined call to ‘tmpdir_destroyp’ from ‘tmpdir_test’
libinput-1.29.1/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): [#def25]
libinput-1.29.1/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.29.1/test/test-utils.c:137:36: acquire_memory: this call could return NULL
libinput-1.29.1/test/test-utils.c:138:9: danger: argument 1 (‘strdup("/tmp/litest_find_files_test.XXXXXX")’) from [(1)](sarif:/runs/0/results/17/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: GCC_ANALYZER_WARNING (CWE-404): [#def26]
libinput-1.29.1/test/test-utils.c:1663:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.1/test/test-utils.c:1661:9: acquire_resource: ‘va_start’ called here
libinput-1.29.1/test/test-utils.c:1663:16: throw: if ‘strv_append_vprintf’ throws an exception...
libinput-1.29.1/test/test-utils.c:1663:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1661|   	va_start(args, format);
# 1662|   	char **strv = NULL;
# 1663|-> 	strv = strv_append_vprintf(strv, "%s %d", args);
# 1664|   	va_end(args);
# 1665|   	return strv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libinput-1.29.1/test/test-utils.c:1680:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dup’
libinput-1.29.1/test/test-utils.c:1668:1: enter_function: entry to ‘strv_append_test’
libinput-1.29.1/test/test-utils.c:1679:29: call_function: calling ‘safe_strdup’ from ‘strv_append_test’
libinput-1.29.1/test/test-utils.c:1679:29: return_function: returning to ‘strv_append_test’ from ‘safe_strdup’
libinput-1.29.1/test/test-utils.c:1680:24: throw: if ‘strv_append_take’ throws an exception...
libinput-1.29.1/test/test-utils.c:1680:24: danger: ‘dup’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5)
# 1678|   		char **strv = NULL;
# 1679|   		char *dup = safe_strdup("test");
# 1680|-> 		strv = strv_append_take(strv, &dup);
# 1681|   		litest_assert_ptr_null(dup);
# 1682|   		litest_assert_ptr_notnull(strv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libinput-1.29.1/test/test-utils.c:1688:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dup2’
libinput-1.29.1/test/test-utils.c:1668:1: enter_function: entry to ‘strv_append_test’
libinput-1.29.1/test/test-utils.c:1679:29: call_function: calling ‘safe_strdup’ from ‘strv_append_test’
libinput-1.29.1/test/test-utils.c:1679:29: return_function: returning to ‘strv_append_test’ from ‘safe_strdup’
libinput-1.29.1/test/test-utils.c:1684:17: branch_true: following ‘true’ branch (when ‘_a’ is non-NULL)...
libinput-1.29.1/test/test-utils.c:1684:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1685:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:1687:30: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:1687:30: call_function: calling ‘safe_strdup’ from ‘strv_append_test’
libinput-1.29.1/test/test-utils.c:1687:30: return_function: returning to ‘strv_append_test’ from ‘safe_strdup’
libinput-1.29.1/test/test-utils.c:1688:24: throw: if ‘strv_append_take’ throws an exception...
libinput-1.29.1/test/test-utils.c:1688:24: danger: ‘dup2’ leaks here; was allocated at [(17)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/16)
# 1686|   
# 1687|   		char *dup2 = safe_strdup("test2");
# 1688|-> 		strv = strv_append_take(strv, &dup2);
# 1689|   		litest_assert_ptr_null(dup2);
# 1690|   		litest_assert_str_eq(strv[1], "test2");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
libinput-1.29.1/test/test-utils.c:1848:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.29.1/test/test-utils.c:1811:1: enter_function: entry to ‘double_array_from_string_test’
libinput-1.29.1/test/test-utils.c:1841:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1843:33: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1843:33: call_function: calling ‘double_array_from_string’ from ‘double_array_from_string_test’
libinput-1.29.1/test/test-utils.c:1843:33: return_function: returning to ‘double_array_from_string_test’ from ‘double_array_from_string’
libinput-1.29.1/test/test-utils.c:1846:38: branch_true: following ‘true’ branch (when ‘idx < _a’)...
libinput-1.29.1/test/test-utils.c:1847:25: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1847:25: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1847:25: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1848:25: danger: dereference of NULL ‘double_array_from_string(*t.string, *t.delim, & len) + idx * 8’
# 1846|   		for (size_t idx = 0; idx < len; idx++) {
# 1847|   			litest_assert_ptr_notnull(array);
# 1848|-> 			litest_assert_double_eq(array[idx], t->array[idx]);
# 1849|   		}
# 1850|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libinput-1.29.1/test/test-utils.c:1931:17: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libinput-1.29.1/test/test-utils.c:1896:1: enter_function: entry to ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1926:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1927:42: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1930:26: call_function: calling ‘kv_double_from_string’ from ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1930:26: return_function: returning to ‘kvsplit_double_test’ from ‘kv_double_from_string’
libinput-1.29.1/test/test-utils.c:1931:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1931:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1931:17: throw: if ‘litest_fail_comparison_int’ throws an exception...
libinput-1.29.1/test/test-utils.c:1931:17: danger: ‘result’ leaks here; was allocated at [(14)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/13)
# 1929|   
# 1930|   		npairs = kv_double_from_string(t->string, t->psep, t->kvsep, &result);
# 1931|-> 		litest_assert_int_eq(npairs, t->nresults);
# 1932|   
# 1933|   		for (ssize_t i = 0; i < npairs; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libinput-1.29.1/test/test-utils.c:1934:25: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libinput-1.29.1/test/test-utils.c:1896:1: enter_function: entry to ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1926:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1927:42: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1930:26: call_function: calling ‘kv_double_from_string’ from ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1930:26: return_function: returning to ‘kvsplit_double_test’ from ‘kv_double_from_string’
libinput-1.29.1/test/test-utils.c:1933:37: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1934:25: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1934:25: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:1934:25: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:1934:25: throw: if ‘litest_fail_comparison_double’ throws an exception...
libinput-1.29.1/test/test-utils.c:1934:25: danger: ‘result’ leaks here; was allocated at [(14)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/13)
# 1932|   
# 1933|   		for (ssize_t i = 0; i < npairs; i++) {
# 1934|-> 			litest_assert_double_eq(t->results[i].a, result[i].key);
# 1935|   			litest_assert_double_eq(t->results[i].b, result[i].value);
# 1936|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libinput-1.29.1/test/test-utils.c:1935:25: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libinput-1.29.1/test/test-utils.c:1896:1: enter_function: entry to ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1926:16: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1927:42: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1930:26: call_function: calling ‘kv_double_from_string’ from ‘kvsplit_double_test’
libinput-1.29.1/test/test-utils.c:1930:26: return_function: returning to ‘kvsplit_double_test’ from ‘kv_double_from_string’
libinput-1.29.1/test/test-utils.c:1933:37: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:1934:25: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:1935:25: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:1935:25: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:1935:25: throw: if ‘litest_fail_comparison_double’ throws an exception...
libinput-1.29.1/test/test-utils.c:1935:25: danger: ‘result’ leaks here; was allocated at [(14)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/13)
# 1933|   		for (ssize_t i = 0; i < npairs; i++) {
# 1934|   			litest_assert_double_eq(t->results[i].a, result[i].key);
# 1935|-> 			litest_assert_double_eq(t->results[i].b, result[i].value);
# 1936|   		}
# 1937|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libinput-1.29.1/test/test-utils.c:2478:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2478:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/3)
# 2476|   	rc = stringbuf_append_string(b, "baz");
# 2477|   	litest_assert_neg_errno_success(rc);
# 2478|-> 	litest_assert_str_eq(b->data, "foobarbaz");
# 2479|   	litest_assert_int_eq(b->len, strlen("foobarbaz"));
# 2480|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libinput-1.29.1/test/test-utils.c:2482:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2482:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2482:9: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2482:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3)
# 2480|   
# 2481|   	rc = stringbuf_ensure_space(b, 500);
# 2482|-> 	litest_assert_neg_errno_success(rc);
# 2483|   	litest_assert_int_ge(b->sz, 500u);
# 2484|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libinput-1.29.1/test/test-utils.c:2483:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_true: following ‘true’ branch (when ‘_a <= 499’)...
libinput-1.29.1/test/test-utils.c:2483:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: throw: if ‘litest_fail_comparison_int’ throws an exception...
libinput-1.29.1/test/test-utils.c:2483:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/3)
# 2481|   	rc = stringbuf_ensure_space(b, 500);
# 2482|   	litest_assert_neg_errno_success(rc);
# 2483|-> 	litest_assert_int_ge(b->sz, 500u);
# 2484|   
# 2485|   	rc = stringbuf_ensure_size(b, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libinput-1.29.1/test/test-utils.c:2488:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2488:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2488:9: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2488:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
# 2486|   	litest_assert_neg_errno_success(rc);
# 2487|   	rc = stringbuf_ensure_size(b, 1024);
# 2488|-> 	litest_assert_neg_errno_success(rc);
# 2489|   	litest_assert_int_ge(b->sz, 1024u);
# 2490|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libinput-1.29.1/test/test-utils.c:2488:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.data’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2488:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2488:9: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2488:9: danger: ‘buf.data’ leaks here; was allocated at [(64)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/63)
# 2486|   	litest_assert_neg_errno_success(rc);
# 2487|   	rc = stringbuf_ensure_size(b, 1024);
# 2488|-> 	litest_assert_neg_errno_success(rc);
# 2489|   	litest_assert_int_ge(b->sz, 1024u);
# 2490|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libinput-1.29.1/test/test-utils.c:2489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_true: following ‘true’ branch (when ‘_a <= 1023’)...
libinput-1.29.1/test/test-utils.c:2489:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: throw: if ‘litest_fail_comparison_int’ throws an exception...
libinput-1.29.1/test/test-utils.c:2489:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/3)
# 2487|   	rc = stringbuf_ensure_size(b, 1024);
# 2488|   	litest_assert_neg_errno_success(rc);
# 2489|-> 	litest_assert_int_ge(b->sz, 1024u);
# 2490|   
# 2491|   	char *data = stringbuf_steal(b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libinput-1.29.1/test/test-utils.c:2489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.data’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_true: following ‘true’ branch (when ‘_a <= 1023’)...
libinput-1.29.1/test/test-utils.c:2489:9: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: throw: if ‘litest_fail_comparison_int’ throws an exception...
libinput-1.29.1/test/test-utils.c:2489:9: danger: ‘buf.data’ leaks here; was allocated at [(64)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/63)
# 2487|   	rc = stringbuf_ensure_size(b, 1024);
# 2488|   	litest_assert_neg_errno_success(rc);
# 2489|-> 	litest_assert_int_ge(b->sz, 1024u);
# 2490|   
# 2491|   	char *data = stringbuf_steal(b);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libinput-1.29.1/test/test-utils.c:2492:9: warning[-Wanalyzer-malloc-leak]: leak of ‘_a’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: call_function: calling ‘stringbuf_init’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2469:9: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_init’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2492:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2492:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2492:9: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2492:9: danger: ‘_a’ leaks here; was allocated at [(4)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/3)
# 2490|   
# 2491|   	char *data = stringbuf_steal(b);
# 2492|-> 	litest_assert_str_eq(data, "foobarbaz");
# 2493|   	litest_assert_int_eq(b->sz, 0u);
# 2494|   	litest_assert_int_eq(b->len, 0u);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libinput-1.29.1/test/test-utils.c:2492:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2492:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2492:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2492:9: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2492:9: danger: ‘str’ leaks here; was allocated at [(84)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/83)
# 2490|   
# 2491|   	char *data = stringbuf_steal(b);
# 2492|-> 	litest_assert_str_eq(data, "foobarbaz");
# 2493|   	litest_assert_int_eq(b->sz, 0u);
# 2494|   	litest_assert_int_eq(b->len, 0u);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libinput-1.29.1/test/test-utils.c:2501:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.data’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2501:9: danger: ‘buf.data’ leaks here; was allocated at [(111)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/110)
# 2499|   	rc = stringbuf_append_string(b, str);
# 2500|   	litest_assert_neg_errno_success(rc);
# 2501|-> 	litest_assert_str_eq(b->data, str);
# 2502|   	litest_assert_int_eq(b->len, 10u);
# 2503|   	stringbuf_reset(b);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
libinput-1.29.1/test/test-utils.c:2515:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2515:22: throw: if ‘write’ throws an exception...
libinput-1.29.1/test/test-utils.c:2515:22: danger: ‘pipefd[1]’ leaks here
# 2513|   	char *compare = NULL;
# 2514|   	for (int i = 0; i < 100; i++) {
# 2515|-> 		rc = write(pipefd[1], str, strlen(str));
# 2516|   		litest_assert_neg_errno_success(rc);
# 2517|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
libinput-1.29.1/test/test-utils.c:2515:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[i]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2515:22: throw: if ‘write’ throws an exception...
libinput-1.29.1/test/test-utils.c:2515:22: danger: ‘pipefd[i]’ leaks here
# 2513|   	char *compare = NULL;
# 2514|   	for (int i = 0; i < 100; i++) {
# 2515|-> 		rc = write(pipefd[1], str, strlen(str));
# 2516|   		litest_assert_neg_errno_success(rc);
# 2517|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
libinput-1.29.1/test/test-utils.c:2516:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_true: following ‘true’ branch (when ‘rc < 0’)...
libinput-1.29.1/test/test-utils.c:2516:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2516:17: danger: ‘pipefd[0]’ leaks here
# 2514|   	for (int i = 0; i < 100; i++) {
# 2515|   		rc = write(pipefd[1], str, strlen(str));
# 2516|-> 		litest_assert_neg_errno_success(rc);
# 2517|   
# 2518|   		rc = stringbuf_append_from_fd(b, pipefd[0], 64);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
libinput-1.29.1/test/test-utils.c:2516:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_true: following ‘true’ branch (when ‘rc < 0’)...
libinput-1.29.1/test/test-utils.c:2516:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2516:17: danger: ‘pipefd[1]’ leaks here
# 2514|   	for (int i = 0; i < 100; i++) {
# 2515|   		rc = write(pipefd[1], str, strlen(str));
# 2516|-> 		litest_assert_neg_errno_success(rc);
# 2517|   
# 2518|   		rc = stringbuf_append_from_fd(b, pipefd[0], 64);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
libinput-1.29.1/test/test-utils.c:2519:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2519:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2519:17: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2519:17: danger: ‘pipefd[0]’ leaks here
# 2517|   
# 2518|   		rc = stringbuf_append_from_fd(b, pipefd[0], 64);
# 2519|-> 		litest_assert_neg_errno_success(rc);
# 2520|   
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
libinput-1.29.1/test/test-utils.c:2519:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2519:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2519:17: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.29.1/test/test-utils.c:2519:17: danger: ‘pipefd[1]’ leaks here
# 2517|   
# 2518|   		rc = stringbuf_append_from_fd(b, pipefd[0], 64);
# 2519|-> 		litest_assert_neg_errno_success(rc);
# 2520|   
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
libinput-1.29.1/test/test-utils.c:2522:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2522:17: throw: if ‘litest_fail_comparison_ptr’ throws an exception...
libinput-1.29.1/test/test-utils.c:2522:17: danger: ‘pipefd[1]’ leaks here
# 2520|   
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|-> 		litest_assert_ptr_notnull(expected);
# 2523|   		litest_assert_str_eq(b->data, expected);
# 2524|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
libinput-1.29.1/test/test-utils.c:2522:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[i]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2522:17: throw: if ‘litest_fail_comparison_ptr’ throws an exception...
libinput-1.29.1/test/test-utils.c:2522:17: danger: ‘pipefd[i]’ leaks here
# 2520|   
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|-> 		litest_assert_ptr_notnull(expected);
# 2523|   		litest_assert_str_eq(b->data, expected);
# 2524|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libinput-1.29.1/test/test-utils.c:2522:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.data’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2522:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2522:17: throw: if ‘litest_fail_comparison_ptr’ throws an exception...
libinput-1.29.1/test/test-utils.c:2522:17: danger: ‘buf.data’ leaks here; was allocated at [(149)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/148)
# 2520|   
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|-> 		litest_assert_ptr_notnull(expected);
# 2523|   		litest_assert_str_eq(b->data, expected);
# 2524|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
libinput-1.29.1/test/test-utils.c:2523:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2523:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2523:17: danger: ‘pipefd[1]’ leaks here
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|   		litest_assert_ptr_notnull(expected);
# 2523|-> 		litest_assert_str_eq(b->data, expected);
# 2524|   
# 2525|   		free(compare);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
libinput-1.29.1/test/test-utils.c:2523:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[i]’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2523:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2523:17: danger: ‘pipefd[i]’ leaks here
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|   		litest_assert_ptr_notnull(expected);
# 2523|-> 		litest_assert_str_eq(b->data, expected);
# 2524|   
# 2525|   		free(compare);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libinput-1.29.1/test/test-utils.c:2523:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.data’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2523:17: throw: if ‘litest_fail_comparison_str’ throws an exception...
libinput-1.29.1/test/test-utils.c:2523:17: danger: ‘buf.data’ leaks here; was allocated at [(149)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/148)
# 2521|   		char *expected = strdup_printf("%s%s", compare ? compare : "", str);
# 2522|   		litest_assert_ptr_notnull(expected);
# 2523|-> 		litest_assert_str_eq(b->data, expected);
# 2524|   
# 2525|   		free(compare);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def55]
libinput-1.29.1/test/test-utils.c:2525:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘compare’
libinput-1.29.1/test/test-utils.c:2463:1: enter_function: entry to ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2470:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2472:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2472:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2472:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2473:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2474:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2474:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2474:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2475:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2476:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2476:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2476:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2477:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2478:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2478:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2478:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2479:9: branch_false: following ‘false’ branch (when ‘_a == 9’)...
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2481:14: call_function: inlined call to ‘stringbuf_ensure_space’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2482:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2483:9: branch_false: following ‘false’ branch (when ‘_a > 499’)...
libinput-1.29.1/test/test-utils.c:2485:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2485:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2485:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2486:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2487:14: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2487:14: call_function: calling ‘stringbuf_ensure_size’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2487:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_ensure_size’
libinput-1.29.1/test/test-utils.c:2488:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2489:9: branch_false: following ‘false’ branch (when ‘_a > 1023’)...
libinput-1.29.1/test/test-utils.c:2491:22: call_function: inlined call to ‘stringbuf_steal’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2492:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2493:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2494:9: branch_false: following ‘false’ branch (when ‘_a == 0’)...
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2495:9: release_memory: first ‘free’ here
libinput-1.29.1/test/test-utils.c:2495:9: branch_false: following ‘false’ branch (when ‘_a’ is NULL)...
libinput-1.29.1/test/test-utils.c:2496:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2499:14: call_function: calling ‘stringbuf_append_string’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2499:14: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_string’
libinput-1.29.1/test/test-utils.c:2500:9: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2501:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2501:9: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2501:9: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2502:9: branch_false: following ‘false’ branch (when ‘_a == 10’)...
libinput-1.29.1/test/test-utils.c:2503:9: call_function: inlined call to ‘stringbuf_reset’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2510:9: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2514:25: branch_true: following ‘true’ branch (when ‘i != 100’)...
libinput-1.29.1/test/test-utils.c:2515:22: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2516:17: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
libinput-1.29.1/test/test-utils.c:2518:22: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2518:22: call_function: calling ‘stringbuf_append_from_fd’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2518:22: return_function: returning to ‘stringbuf_test’ from ‘stringbuf_append_from_fd’
libinput-1.29.1/test/test-utils.c:2519:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: following ‘false’ branch (when ‘compare’ is NULL)...
libinput-1.29.1/test/test-utils.c:2521:34: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2521:34: call_function: calling ‘strdup_printf’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2521:34: return_function: returning to ‘stringbuf_test’ from ‘strdup_printf’
libinput-1.29.1/test/test-utils.c:2522:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2523:17: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2523:17: call_function: calling ‘streq’ from ‘stringbuf_test’
libinput-1.29.1/test/test-utils.c:2523:17: return_function: returning to ‘stringbuf_test’ from ‘streq’
libinput-1.29.1/test/test-utils.c:2523:17: branch_true: following ‘true’ branch...
libinput-1.29.1/test/test-utils.c:2525:17: branch_true: ...to here
libinput-1.29.1/test/test-utils.c:2525:17: danger: second ‘free’ here; first ‘free’ was at [(149)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/148)
# 2523|   		litest_assert_str_eq(b->data, expected);
# 2524|   
# 2525|-> 		free(compare);
# 2526|   		compare = expected;
# 2527|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
libinput-1.29.1/test/test-utils.c:2814:43: warning[-Wanalyzer-fd-leak]: leak of file descriptor
libinput-1.29.1/test/test-utils.c:2793:1: enter_function: entry to ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2800:45: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2800:45: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.29.1/test/test-utils.c:2804:43: call_function: calling ‘zalloc’ from ‘attribute_cleanup’
libinput-1.29.1/test/test-utils.c:2804:43: return_function: returning to ‘attribute_cleanup’ from ‘zalloc’
libinput-1.29.1/test/test-utils.c:2809:17: branch_false: following ‘false’ branch...
libinput-1.29.1/test/test-utils.c:2814:43: branch_false: ...to here
libinput-1.29.1/test/test-utils.c:2814:43: danger: leaks here
# 2812|   		litest_assert_int_eq(badfd, -1);
# 2813|   
# 2814|-> 		_autoclose_ int stealfd = open("/proc/self/cmdline", O_RDONLY);
# 2815|   		steal_fd(&stealfd);
# 2816|   		litest_assert_int_eq(stealfd, -1);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-49.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibinput-1.30.1-1.fc44
diffbase-store-results-to/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.tar.xz
diffbase-time-created2026-01-08 18:52:16
diffbase-time-finished2026-01-08 18:54:21
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-49.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibinput-1.29.1-1.fc43
store-results-to/tmp/tmp71_jxd9s/libinput-1.29.1-1.fc43.tar.xz
time-created2026-01-08 18:49:10
time-finished2026-01-08 18:51:39
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp71_jxd9s/libinput-1.29.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp71_jxd9s/libinput-1.29.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9