util-linux-2.41.3-12.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-457): [#def1]
util-linux-2.41.3/disk-utils/fdformat.c:68: error[uninitvar]: Uninitialized variable: current
#   66|   	format_begin(ctrl);
#   67|   
#   68|-> 	for (current.track = track_from; current.track <= track_to; current.track++) {
#   69|   		for (current.head = 0; current.head < param.head; current.head++) {
#   70|   			printf("%3u/%u\b\b\b\b\b", current.track, current.head);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
util-linux-2.41.3/disk-utils/fdformat.c:129:45: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(track_size) + count’
util-linux-2.41.3/disk-utils/fdformat.c:177:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/fdformat.c:203:16: branch_true: following ‘true’ branch (when ‘ch != -1’)...
util-linux-2.41.3/disk-utils/fdformat.c:204:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:229:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
util-linux-2.41.3/disk-utils/fdformat.c:233:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:233:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:235:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:235:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:238:16: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:239:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:241:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:241:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:246:42: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:248:12: branch_false: following ‘false’ branch (when ‘has_user_defined_track_to != 0’)...
util-linux-2.41.3/disk-utils/fdformat.c:251:27: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:251:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:253:12: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:253:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:255:12: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:255:12: branch_false: following ‘false’ branch (when ‘track_to >= track_from’)...
util-linux-2.41.3/disk-utils/fdformat.c:258:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:258:9: call_function: calling ‘format_disk’ from ‘main’
util-linux-2.41.3/disk-utils/fdformat.c:258:9: return_function: returning to ‘main’ from ‘format_disk’
util-linux-2.41.3/disk-utils/fdformat.c:260:12: branch_true: following ‘true’ branch (when ‘verify != 0’)...
util-linux-2.41.3/disk-utils/fdformat.c:261:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:261:17: call_function: calling ‘verify_disk’ from ‘main’
#  127|   				}
#  128|   				for (count = 0; count < track_size; count++)
#  129|-> 					if (data[count] != FD_FILL_BYTE) {
#  130|   						if (retries_left) {
#  131|   							format_begin(ctrl);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
util-linux-2.41.3/disk-utils/fdformat.c:129:45: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(track_size)’
util-linux-2.41.3/disk-utils/fdformat.c:81:13: enter_function: entry to ‘verify_disk’
util-linux-2.41.3/disk-utils/fdformat.c:89:16: call_function: calling ‘xmalloc’ from ‘verify_disk’
util-linux-2.41.3/disk-utils/fdformat.c:89:16: return_function: returning to ‘verify_disk’ from ‘xmalloc’
util-linux-2.41.3/disk-utils/fdformat.c:97:42: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:98:22: branch_true: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:109:36: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdformat.c:109:36: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:128:49: branch_true: following ‘true’ branch (when ‘count < track_size’)...
util-linux-2.41.3/disk-utils/fdformat.c:129:49: branch_true: ...to here
util-linux-2.41.3/disk-utils/fdformat.c:129:45: danger: ‘xmalloc(track_size) + count’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  127|   				}
#  128|   				for (count = 0; count < track_size; count++)
#  129|-> 					if (data[count] != FD_FILL_BYTE) {
#  130|   						if (retries_left) {
#  131|   							format_begin(ctrl);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
util-linux-2.41.3/disk-utils/fdisk-menu.c:296:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((unsigned char*)&*m)[8]’
util-linux-2.41.3/disk-utils/fdisk-menu.c:349:12: enter_function: entry to ‘menu_detect_collisions’
util-linux-2.41.3/disk-utils/fdisk-menu.c:354:21: call_function: calling ‘next_menu_entry’ from ‘menu_detect_collisions’
#  294|   		    (m->label && (!lb || !(m->label & type))) ||
#  295|   		/* unwanted for nested PT */
#  296|-> 		    (m->nonested && parent) ||
#  297|   		/* menu excluded for specified labels */
#  298|   		    (m->exclude && lb && (m->exclude & type))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:297:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 257)’ where non-null expected
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:696:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:793:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:797:23: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:803:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:805:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: call_function: calling ‘parse_directory’ from ‘main’
#  295|   	/* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */
#  296|   	path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1);
#  297|-> 	memcpy(path, name, len);
#  298|   	endpath = path + len;
#  299|   	*endpath = '/';

Error: CPPCHECK_WARNING (CWE-190): [#def6]
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:372: error[integerOverflow]: Signed integer overflow for expression '-(1<<24)'.
#  370|   		} else {
#  371|   			entry->size = st.st_rdev;
#  372|-> 			if (entry->size & -(1<<CRAMFS_SIZE_WIDTH))
#  373|   				warn_dev = 1;
#  374|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:851:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:696:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:793:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:797:23: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:803:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:805:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: call_function: calling ‘parse_directory’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: return_function: returning to ‘main’ from ‘parse_directory’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:820:9: call_function: calling ‘eliminate_doubles’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:820:9: return_function: returning to ‘main’ from ‘eliminate_doubles’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:851:12: danger: ‘<unknown>’ leaks here; was allocated at [(30)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/29)
#  849|   			 -1, 0);
#  850|   
#  851|-> 	if (-1 == (int) (long) rom_image)
#  852|   		err(MKFS_EX_ERROR, _("ROM image map"));
#  853|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def8]
util-linux-2.41.3/disk-utils/mkfs.minix.c:562:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘inode_map’ where non-null expected
util-linux-2.41.3/disk-utils/mkfs.minix.c:746:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:776:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:777:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:822:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:823:35: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:827:12: branch_false: following ‘false’ branch (when ‘argc == 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: call_function: calling ‘check_user_instructions’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: return_function: returning to ‘main’ from ‘check_user_instructions’
util-linux-2.41.3/disk-utils/mkfs.minix.c:835:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:840:25: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:841:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:57: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: call_function: calling ‘determine_device_blocks’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: return_function: returning to ‘main’ from ‘determine_device_blocks’
util-linux-2.41.3/disk-utils/mkfs.minix.c:846:9: call_function: calling ‘setup_tables’ from ‘main’
#  560|   	inode_map = xmalloc(imaps * MINIX_BLOCK_SIZE);
#  561|   	zone_map = xmalloc(zmaps * MINIX_BLOCK_SIZE);
#  562|-> 	memset(inode_map,0xff,imaps * MINIX_BLOCK_SIZE);
#  563|   	memset(zone_map,0xff,zmaps * MINIX_BLOCK_SIZE);
#  564|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
util-linux-2.41.3/disk-utils/mkfs.minix.c:563:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘zone_map’ where non-null expected
util-linux-2.41.3/disk-utils/mkfs.minix.c:746:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:776:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:777:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:822:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:823:35: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:827:12: branch_false: following ‘false’ branch (when ‘argc == 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: call_function: calling ‘check_user_instructions’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: return_function: returning to ‘main’ from ‘check_user_instructions’
util-linux-2.41.3/disk-utils/mkfs.minix.c:835:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:840:25: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:841:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:57: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: call_function: calling ‘determine_device_blocks’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: return_function: returning to ‘main’ from ‘determine_device_blocks’
util-linux-2.41.3/disk-utils/mkfs.minix.c:846:9: call_function: calling ‘setup_tables’ from ‘main’
#  561|   	zone_map = xmalloc(zmaps * MINIX_BLOCK_SIZE);
#  562|   	memset(inode_map,0xff,imaps * MINIX_BLOCK_SIZE);
#  563|-> 	memset(zone_map,0xff,zmaps * MINIX_BLOCK_SIZE);
#  564|   
#  565|   	for (i = get_first_zone() ; i<zones ; i++)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
util-linux-2.41.3/disk-utils/mkfs.minix.c:571:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘inode_buffer’ where non-null expected
util-linux-2.41.3/disk-utils/mkfs.minix.c:746:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:776:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:777:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:822:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:823:35: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:827:12: branch_false: following ‘false’ branch (when ‘argc == 0’)...
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:830:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: call_function: calling ‘check_user_instructions’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:834:9: return_function: returning to ‘main’ from ‘check_user_instructions’
util-linux-2.41.3/disk-utils/mkfs.minix.c:835:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:838:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:840:25: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:841:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:57: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:843:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: call_function: calling ‘determine_device_blocks’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.minix.c:845:9: return_function: returning to ‘main’ from ‘determine_device_blocks’
util-linux-2.41.3/disk-utils/mkfs.minix.c:846:9: call_function: calling ‘setup_tables’ from ‘main’
#  569|   
#  570|   	inode_buffer = xmalloc(get_inode_buffer_size());
#  571|-> 	memset(inode_buffer,0, get_inode_buffer_size());
#  572|   
#  573|   	printf(P_("%lu inode\n", "%lu inodes\n", inodes), inodes);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
util-linux-2.41.3/include/all-io.h:67:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected
util-linux-2.41.3/disk-utils/fdisk.c:990:13: enter_function: entry to ‘dump_blkdev’
util-linux-2.41.3/disk-utils/fdisk.c:998:9: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/fdisk.c:1000:13: branch_true: ...to here
util-linux-2.41.3/disk-utils/fdisk.c:1000:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fdisk.c:1003:38: branch_false: ...to here
util-linux-2.41.3/disk-utils/fdisk.c:1003:38: call_function: calling ‘xmalloc’ from ‘dump_blkdev’
util-linux-2.41.3/disk-utils/fdisk.c:1003:38: return_function: returning to ‘dump_blkdev’ from ‘xmalloc’
util-linux-2.41.3/disk-utils/fdisk.c:1005:21: call_function: calling ‘read_all’ from ‘dump_blkdev’
#   65|   	int tries = 0;
#   66|   
#   67|-> 	memset(buf, 0, count);
#   68|   	while (count > 0) {
#   69|   		ret = read(fd, buf, count);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
util-linux-2.41.3/include/all-io.h:97:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
util-linux-2.41.3/sys-utils/setpriv.c:802:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/setpriv.c:1044:12: branch_false: following ‘false’ branch (when ‘dumplevel == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: following ‘false’ branch (when ‘list_caps == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1060:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1060:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1063:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1079:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1089:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1089:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1092:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1092:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1094:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1094:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1096:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1096:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1097:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1097:17: call_function: calling ‘do_seccomp_filter’ from ‘main’
#   95|   
#   96|   	while (1) {
#   97|-> 		ret = read_all(fd, *buf + c, size - c);
#   98|   		if (ret < 0) {
#   99|   			free(*buf);

Error: CPPCHECK_WARNING (CWE-476): [#def13]
util-linux-2.41.3/include/fgetwc_or_err.h:12: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: stream
#   10|   
#   11|   	errno = 0;
#   12|-> 	ret = fgetwc(stream);
#   13|   	if (ret == WEOF && errno != 0)
#   14|   		err(EXIT_FAILURE, _("fgetwc() failed"));

Error: GCC_ANALYZER_WARNING (CWE-416): [#def14]
util-linux-2.41.3/include/list.h:53:9: warning[-Wanalyzer-use-after-free]: use after 'free' of 'child'
util-linux-2.41.3/libsmartcols/src/line.c:242:5: enter_function: entry to 'scols_line_add_child'
util-linux-2.41.3/libsmartcols/src/line.c:244:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/line.c:247:9: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/line.c:248:9: call_function: calling 'scols_ref_line' from 'scols_line_add_child'
util-linux-2.41.3/libsmartcols/src/line.c:248:9: return_function: returning to 'scols_line_add_child' from 'scols_ref_line'
util-linux-2.41.3/libsmartcols/src/line.c:249:9: call_function: calling 'scols_ref_line' from 'scols_line_add_child'
util-linux-2.41.3/libsmartcols/src/line.c:249:9: return_function: returning to 'scols_line_add_child' from 'scols_ref_line'
util-linux-2.41.3/libsmartcols/src/line.c:252:12: branch_true: following 'true' branch...
util-linux-2.41.3/libsmartcols/src/line.c:253:17: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/line.c:253:17: call_function: calling 'scols_line_remove_child' from 'scols_line_add_child'
util-linux-2.41.3/libsmartcols/src/line.c:253:17: return_function: returning to 'scols_line_add_child' from 'scols_line_remove_child'
util-linux-2.41.3/libsmartcols/src/line.c:256:9: call_function: inlined call to 'list_add_tail' from 'scols_line_add_child'
#   51|   {
#   52|   	next->prev = add;
#   53|-> 	add->next = next;
#   54|   	add->prev = prev;
#   55|   	prev->next = add;

Error: GCC_ANALYZER_WARNING (CWE-416): [#def15]
util-linux-2.41.3/include/list.h:107:9: warning[-Wanalyzer-use-after-free]: use after 'free' of 'v'
util-linux-2.41.3/libblkid/src/probe.c:2108:13: enter_function: entry to 'blkid_probe_get_wholedisk_probe'
util-linux-2.41.3/libblkid/src/probe.c:2112:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2115:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2127:12: branch_true: following 'true' branch...
util-linux-2.41.3/libblkid/src/probe.c:2129:35: branch_true: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2132:20: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2135:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2137:34: call_function: calling 'blkid_new_probe_from_filename' from 'blkid_probe_get_wholedisk_probe'
#  105|   _INLINE_ void list_del(struct list_head *entry)
#  106|   {
#  107|-> 	__list_del(entry->prev, entry->next);
#  108|   }
#  109|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def16]
util-linux-2.41.3/include/list.h:126:16: warning[-Wanalyzer-infinite-loop]: infinite loop
#  124|   _INLINE_ int list_empty(struct list_head *head)
#  125|   {
#  126|-> 	return head->next == head;
#  127|   }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
util-linux-2.41.3/include/strutils.h:274:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xstrdup(*<unknown>)’
util-linux-2.41.3/disk-utils/partx.c:798:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/partx.c:923:13: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/partx.c:924:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/partx.c:933:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/partx.c:943:23: branch_false: ...to here
util-linux-2.41.3/disk-utils/partx.c:943:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/partx.c:948:30: branch_true: ...to here
util-linux-2.41.3/disk-utils/partx.c:950:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
util-linux-2.41.3/disk-utils/partx.c:955:50: branch_false: ...to here
util-linux-2.41.3/disk-utils/partx.c:955:37: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.41.3/disk-utils/partx.c:955:37: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.41.3/disk-utils/partx.c:957:53: call_function: calling ‘ul_startswith’ from ‘main’
util-linux-2.41.3/disk-utils/partx.c:957:53: return_function: returning to ‘main’ from ‘ul_startswith’
util-linux-2.41.3/include/strutils.h:274:13: danger: ‘xstrdup(*<unknown>)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  272|   	size_t sz = prefix ? strlen(prefix) : 0;
#  273|   
#  274|->         if (s && sz && strncmp(s, prefix, sz) == 0)
#  275|                   return s + sz;
#  276|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((*valuelen >> 1) + 1)’
util-linux-2.41.3/misc-utils/uuidgen.c:52:14: enter_function: entry to ‘unhex’
util-linux-2.41.3/misc-utils/uuidgen.c:57:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidgen.c:63:26: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidgen.c:63:18: call_function: calling ‘xmalloc’ from ‘unhex’
util-linux-2.41.3/misc-utils/uuidgen.c:63:18: return_function: returning to ‘unhex’ from ‘xmalloc’
util-linux-2.41.3/misc-utils/uuidgen.c:65:25: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/uuidgen.c:66:26: branch_true: ...to here
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc((*valuelen >> 1) + 1)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)((cols + 1) * rows))’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:809:25: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:809:17: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:809:17: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:810:18: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:810:18: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc((long unsigned int)((cols + 1) * rows))’ leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)(rows * cols * 2))’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:809:25: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:809:17: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:809:17: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:810:18: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:810:18: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc((long unsigned int)(rows * cols * 2))’ leaks here; was allocated at [(22)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/21)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)*ctl.pagesize)’
util-linux-2.41.3/disk-utils/mkswap.c:245:13: enter_function: entry to ‘check_blocks’
util-linux-2.41.3/disk-utils/mkswap.c:251:9: branch_true: following ‘true’ branch (when ‘ctl’ is non-NULL)...
util-linux-2.41.3/disk-utils/mkswap.c:252:9: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkswap.c:252:9: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/mkswap.c:254:26: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkswap.c:254:18: call_function: calling ‘xmalloc’ from ‘check_blocks’
util-linux-2.41.3/disk-utils/mkswap.c:254:18: return_function: returning to ‘check_blocks’ from ‘xmalloc’
util-linux-2.41.3/disk-utils/mkswap.c:255:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/mkswap.c:257:32: branch_true: ...to here
util-linux-2.41.3/disk-utils/mkswap.c:259:20: branch_true: following ‘true’ branch (when ‘do_seek != 0’)...
util-linux-2.41.3/disk-utils/mkswap.c:259:32: branch_true: ...to here
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc((long unsigned int)*ctl.pagesize)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(24)’
util-linux-2.41.3/misc-utils/lsclocks.c:512:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/lsclocks.c:565:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/lsclocks.c:566:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsclocks.c:587:38: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/misc-utils/lsclocks.c:587:38: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(32)’
util-linux-2.41.3/sys-utils/setpriv-landlock.c:128:6: enter_function: entry to ‘parse_landlock_rule’
util-linux-2.41.3/sys-utils/setpriv-landlock.c:130:44: call_function: calling ‘xmalloc’ from ‘parse_landlock_rule’
util-linux-2.41.3/sys-utils/setpriv-landlock.c:130:44: return_function: returning to ‘parse_landlock_rule’ from ‘xmalloc’
util-linux-2.41.3/sys-utils/setpriv-landlock.c:135:20: call_function: calling ‘ul_startswith’ from ‘parse_landlock_rule’
util-linux-2.41.3/sys-utils/setpriv-landlock.c:135:20: return_function: returning to ‘parse_landlock_rule’ from ‘ul_startswith’
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc(32)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(4096)’
util-linux-2.41.3/disk-utils/fsck.cramfs.c:680:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/fsck.cramfs.c:728:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fsck.cramfs.c:732:24: branch_false: ...to here
util-linux-2.41.3/disk-utils/fsck.cramfs.c:734:9: call_function: calling ‘test_super’ from ‘main’
util-linux-2.41.3/disk-utils/fsck.cramfs.c:734:9: return_function: returning to ‘main’ from ‘test_super’
util-linux-2.41.3/disk-utils/fsck.cramfs.c:735:9: call_function: calling ‘test_crc’ from ‘main’
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(len + 257)’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:696:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:793:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:797:23: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:803:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:805:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: call_function: calling ‘parse_directory’ from ‘main’
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(len)’
util-linux-2.41.3/sys-utils/readprofile.c:120:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/readprofile.c:211:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:236:23: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:237:29: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:238:17: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:240:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:240:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
util-linux-2.41.3/sys-utils/readprofile.c:243:15: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:243:15: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/sys-utils/readprofile.c:243:15: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/include/xalloc.h:32:13: danger: ‘xmalloc(len)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
util-linux-2.41.3/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xstrndup(a, (long unsigned int)(p2 - a))’
util-linux-2.41.3/text-utils/hexdump-parse.c:228:6: enter_function: entry to ‘rewrite_rules’
util-linux-2.41.3/text-utils/hexdump-parse.c:238:9: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:245:17: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:246:24: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:247:30: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:247:30: call_function: calling ‘xcalloc’ from ‘rewrite_rules’
util-linux-2.41.3/text-utils/hexdump-parse.c:247:30: return_function: returning to ‘rewrite_rules’ from ‘xcalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:253:32: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:257:28: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:257:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:267:29: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:267:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:270:38: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:270:44: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:283:25: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:292:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:293:33: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:294:33: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:295:41: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:403:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:404:36: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:408:45: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:410:44: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:411:65: call_function: calling ‘xstrndup’ from ‘rewrite_rules’
util-linux-2.41.3/text-utils/hexdump-parse.c:411:65: return_function: returning to ‘rewrite_rules’ from ‘xstrndup’
util-linux-2.41.3/text-utils/hexdump-parse.c:411:65: call_function: calling ‘color_fmt’ from ‘rewrite_rules’
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
util-linux-2.41.3/include/xalloc.h:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/sys-utils/irq-common.c:531:24: enter_function: entry to ‘get_scols_table’
util-linux-2.41.3/sys-utils/irq-common.c:546:16: call_function: calling ‘get_irqinfo’ from ‘get_scols_table’
#   52|   void *xreallocarray(void *ptr, const size_t nelems, const size_t size)
#   53|   {
#   54|-> 	void *ret = reallocarray(ptr, nelems, size);
#   55|   
#   56|   	if (!ret && size && nelems)

Error: GCC_ANALYZER_WARNING (CWE-762): [#def29]
util-linux-2.41.3/include/xalloc.h:54:21: warning[-Wanalyzer-mismatching-deallocation]: ‘ptr’ should have been deallocated with ‘free’ but was deallocated with ‘reallocarray’
util-linux-2.41.3/text-utils/ul.c:566:5: enter_function: entry to ‘main’
util-linux-2.41.3/text-utils/ul.c:592:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/text-utils/ul.c:593:17: branch_true: ...to here
util-linux-2.41.3/text-utils/ul.c:630:9: call_function: calling ‘init_buffer’ from ‘main’
util-linux-2.41.3/text-utils/ul.c:630:9: return_function: returning to ‘main’ from ‘init_buffer’
util-linux-2.41.3/text-utils/ul.c:632:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/ul.c:633:17: branch_true: ...to here
util-linux-2.41.3/text-utils/ul.c:633:17: call_function: calling ‘filter’ from ‘main’
#   52|   void *xreallocarray(void *ptr, const size_t nelems, const size_t size)
#   53|   {
#   54|-> 	void *ret = reallocarray(ptr, nelems, size);
#   55|   
#   56|   	if (!ret && size && nelems)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_miscdev(minor, & name)’
util-linux-2.41.3/lsfd-cmd/cdev.c:138:13: enter_function: entry to ‘read_misc’
util-linux-2.41.3/lsfd-cmd/cdev.c:144:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/lsfd-cmd/cdev.c:147:21: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/cdev.c:150:27: call_function: calling ‘new_miscdev’ from ‘read_misc’
util-linux-2.41.3/lsfd-cmd/cdev.c:150:27: return_function: returning to ‘read_misc’ from ‘new_miscdev’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘new_miscdev(minor, & name)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_nodev(minor,  filesystem)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1947:13: enter_function: entry to ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1961:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1979:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: return_function: returning to ‘read_process’ from ‘collect_execve_file’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1986:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1987:16: call_function: inlined call to ‘kcmp’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1986:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2008:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:2008:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2014:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:2014:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2016:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2018:29: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:2020:25: call_function: calling ‘read_mountinfo_in_mntns’ from ‘read_process’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_partition(__dev, & name)’
util-linux-2.41.3/lsfd-cmd/bdev.c:108:13: enter_function: entry to ‘read_partitions’
util-linux-2.41.3/lsfd-cmd/bdev.c:114:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/lsfd-cmd/bdev.c:117:21: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/bdev.c:119:29: call_function: calling ‘new_partition’ from ‘read_partitions’
util-linux-2.41.3/lsfd-cmd/bdev.c:119:29: return_function: returning to ‘read_partitions’ from ‘new_partition’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘new_partition(__dev, & name)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_zram(*<unknown>)’
util-linux-2.41.3/sys-utils/zramctl.c:624:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/zramctl.c:717:12: branch_false: following ‘false’ branch (when ‘find == 0’)...
util-linux-2.41.3/sys-utils/zramctl.c:720:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:723:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:726:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:726:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:735:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:736:25: branch_true: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:746:20: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/sys-utils/zramctl.c:751:21: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:751:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:752:46: branch_true: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:752:32: call_function: calling ‘new_zram’ from ‘main’
util-linux-2.41.3/sys-utils/zramctl.c:752:32: return_function: returning to ‘main’ from ‘new_zram’
util-linux-2.41.3/sys-utils/zramctl.c:753:30: call_function: calling ‘zram_exist’ from ‘main’
util-linux-2.41.3/sys-utils/zramctl.c:753:30: return_function: returning to ‘main’ from ‘zram_exist’
util-linux-2.41.3/sys-utils/zramctl.c:753:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:754:57: branch_true: ...to here
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘new_zram(*<unknown>)’ leaks here; was allocated at [(20)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/19)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘open_pidfds(n_pids,  parse_pids(n_pids,  argv + (long unsigned int)parse_options(argc,  argv) * 8))’
util-linux-2.41.3/misc-utils/waitpid.c:223:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:234:12: branch_false: following ‘false’ branch (when ‘n_pids != 0’)...
util-linux-2.41.3/misc-utils/waitpid.c:237:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/waitpid.c:241:23: call_function: calling ‘parse_pids’ from ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:241:23: return_function: returning to ‘main’ from ‘parse_pids’
util-linux-2.41.3/misc-utils/waitpid.c:243:18: call_function: calling ‘open_pidfds’ from ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:243:18: return_function: returning to ‘main’ from ‘open_pidfds’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘open_pidfds(n_pids,  parse_pids(n_pids,  argv + (long unsigned int)parse_options(argc,  argv) * 8))’ leaks here; was allocated at [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_pids(n_pids,  argv + (long unsigned int)parse_options(argc,  argv) * 8)’
util-linux-2.41.3/misc-utils/waitpid.c:223:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:234:12: branch_false: following ‘false’ branch (when ‘n_pids != 0’)...
util-linux-2.41.3/misc-utils/waitpid.c:237:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/waitpid.c:241:23: call_function: calling ‘parse_pids’ from ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:241:23: return_function: returning to ‘main’ from ‘parse_pids’
util-linux-2.41.3/misc-utils/waitpid.c:243:18: call_function: calling ‘open_pidfds’ from ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:243:18: return_function: returning to ‘main’ from ‘open_pidfds’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘parse_pids(n_pids,  argv + (long unsigned int)parse_options(argc,  argv) * 8)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 120)’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1789:19: branch_false: ...to here
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘xcalloc(1, 120)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 152)’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:201:13: enter_function: entry to ‘load_sock_xinfo_with_fd’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:204:17: call_function: calling ‘load_sock_xinfo_no_nsswitch’ from ‘load_sock_xinfo_with_fd’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 208)’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1784:21: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1784:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1787:17: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1795:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1798:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1798:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1803:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1803:19: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/login-utils/lslogins.c:1818:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1818:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1822:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1822:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1825:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1825:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1828:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1828:13: call_function: calling ‘create_usertree’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 224)’
util-linux-2.41.3/sys-utils/lscpu.c:1217:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/lscpu.c:1261:15: call_function: inlined call to ‘lscpu_new_context’ from ‘main’
util-linux-2.41.3/sys-utils/lscpu.c:1261:15: call_function: inlined call to ‘lscpu_new_context’ from ‘main’
util-linux-2.41.3/sys-utils/lscpu.c:1341:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/lscpu.c:1350:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/lscpu.c:1350:12: branch_false: following ‘false’ branch (when ‘cpu_modifier_specified == 0’)...
util-linux-2.41.3/sys-utils/lscpu.c:1358:13: branch_false: ...to here
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘xcalloc(1, 224)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 24)’
util-linux-2.41.3/misc-utils/kill.c:587:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/kill.c:600:16: call_function: calling ‘parse_arguments’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 240)’
util-linux-2.41.3/disk-utils/fsck.c:1620:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/fsck.c:1650:9: call_function: calling ‘parse_argv’ from ‘main’
util-linux-2.41.3/disk-utils/fsck.c:1650:9: return_function: returning to ‘main’ from ‘parse_argv’
util-linux-2.41.3/disk-utils/fsck.c:1652:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/fsck.c:1653:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/fsck.c:1657:9: call_function: calling ‘load_fs_info’ from ‘main’
util-linux-2.41.3/disk-utils/fsck.c:1657:9: return_function: returning to ‘main’ from ‘load_fs_info’
util-linux-2.41.3/disk-utils/fsck.c:1659:21: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.41.3/disk-utils/fsck.c:1659:21: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.41.3/disk-utils/fsck.c:1661:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fsck.c:1664:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/fsck.c:1664:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fsck.c:1671:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/fsck.c:1671:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/fsck.c:1674:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/fsck.c:1674:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/disk-utils/fsck.c:1675:17: branch_true: ...to here
util-linux-2.41.3/disk-utils/fsck.c:1677:24: call_function: calling ‘check_all’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 32)’
util-linux-2.41.3/misc-utils/logger.c:1126:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/logger.c:1191:16: branch_true: following ‘true’ branch (when ‘ch != -1’)...
util-linux-2.41.3/misc-utils/logger.c:1193:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/logger.c:1280:30: call_function: calling ‘valid_structured_data_id’ from ‘main’
util-linux-2.41.3/misc-utils/logger.c:1280:30: return_function: returning to ‘main’ from ‘valid_structured_data_id’
util-linux-2.41.3/misc-utils/logger.c:1280:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/logger.c:1282:25: branch_false: ...to here
util-linux-2.41.3/misc-utils/logger.c:1282:25: call_function: calling ‘add_structured_data_id’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 40)’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:201:13: enter_function: entry to ‘load_sock_xinfo_with_fd’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:204:17: call_function: calling ‘load_sock_xinfo_no_nsswitch’ from ‘load_sock_xinfo_with_fd’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 48)’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2552:13: enter_function: entry to ‘handle_diag_vsock’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2566:12: branch_false: following ‘false’ branch (when ‘nlmsg_len > 47’)...
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2569:24: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2573:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2577:14: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2577:14: call_function: calling ‘xcalloc’ from ‘handle_diag_vsock’
util-linux-2.41.3/lsfd-cmd/sock-xinfo.c:2577:14: return_function: returning to ‘handle_diag_vsock’ from ‘xcalloc’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘xcalloc(1, 48)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 56)’
util-linux-2.41.3/sys-utils/zramctl.c:624:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/zramctl.c:717:12: branch_false: following ‘false’ branch (when ‘find == 0’)...
util-linux-2.41.3/sys-utils/zramctl.c:720:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:723:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:726:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:726:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:735:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:736:25: branch_true: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:746:20: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/sys-utils/zramctl.c:751:21: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:751:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/zramctl.c:756:17: branch_false: ...to here
util-linux-2.41.3/sys-utils/zramctl.c:756:17: call_function: calling ‘status’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 8)’
util-linux-2.41.3/sys-utils/lsipc.c:1438:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/lsipc.c:1444:37: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/sys-utils/lsipc.c:1444:37: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/sys-utils/lsipc.c:1503:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
util-linux-2.41.3/sys-utils/lsipc.c:1505:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/lsipc.c:1505:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/sys-utils/lsipc.c:1505:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘xcalloc(1, 8)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 96)’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:696:5: enter_function: entry to ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:793:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:797:23: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:803:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:805:14: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:13: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:809:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: branch_false: ...to here
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:812:22: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: call_function: calling ‘parse_directory’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:817:28: return_function: returning to ‘main’ from ‘parse_directory’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:820:9: call_function: calling ‘eliminate_doubles’ from ‘main’
util-linux-2.41.3/disk-utils/mkfs.cramfs.c:820:9: return_function: returning to ‘main’ from ‘eliminate_doubles’
util-linux-2.41.3/include/xalloc.h:68:13: danger: ‘xcalloc(1, 96)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
util-linux-2.41.3/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(n_pids, 4)’
util-linux-2.41.3/misc-utils/waitpid.c:223:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:234:12: branch_false: following ‘false’ branch (when ‘n_pids != 0’)...
util-linux-2.41.3/misc-utils/waitpid.c:237:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/waitpid.c:241:23: call_function: calling ‘parse_pids’ from ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:241:23: return_function: returning to ‘main’ from ‘parse_pids’
util-linux-2.41.3/misc-utils/waitpid.c:243:18: call_function: calling ‘open_pidfds’ from ‘main’
#   66|   	void *ret = calloc(nelems, size);
#   67|   
#   68|-> 	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
util-linux-2.41.3/include/xalloc.h:70:16: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
util-linux-2.41.3/text-utils/hexdump-parse.c:478:26: enter_function: entry to ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: call_function: calling ‘xmalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: return_function: returning to ‘color_fmt’ from ‘xmalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: call_function: calling ‘xcalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: return_function: returning to ‘color_fmt’ from ‘xcalloc’
util-linux-2.41.3/include/xalloc.h:70:16: danger: ‘hcnext’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#   68|   	if (!ret && size && nelems)
#   69|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   70|-> 	return ret;
#   71|   }
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
util-linux-2.41.3/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.label’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
util-linux-2.41.3/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.partlabel’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
util-linux-2.41.3/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.ptuuid’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
util-linux-2.41.3/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.uuid’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
util-linux-2.41.3/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘special’
util-linux-2.41.3/sys-utils/swapoff.c:228:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/swapoff.c:289:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/swapoff.c:290:39: branch_true: ...to here
util-linux-2.41.3/sys-utils/swapoff.c:290:27: call_function: calling ‘do_swapoff’ from ‘main’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
util-linux-2.41.3/include/xalloc.h:110:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/text-utils/hexdump-parse.c:478:26: enter_function: entry to ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: call_function: calling ‘xmalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: return_function: returning to ‘color_fmt’ from ‘xmalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: call_function: calling ‘xcalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: return_function: returning to ‘color_fmt’ from ‘xcalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:492:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:495:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: call_function: calling ‘xstrndup’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: return_function: returning to ‘color_fmt’ from ‘xstrndup’
util-linux-2.41.3/text-utils/hexdump-parse.c:505:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:506:32: branch_true: ...to here
util-linux-2.41.3/include/xalloc.h:110:16: danger: ‘<unknown>’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  108|   	if (!ret)
#  109|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#  110|-> 	return ret;
#  111|   }
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
util-linux-2.41.3/include/xalloc.h:110:16: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
util-linux-2.41.3/text-utils/hexdump-parse.c:478:26: enter_function: entry to ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: call_function: calling ‘xmalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: return_function: returning to ‘color_fmt’ from ‘xmalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: call_function: calling ‘xcalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: return_function: returning to ‘color_fmt’ from ‘xcalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:492:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:495:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: call_function: calling ‘xstrndup’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: return_function: returning to ‘color_fmt’ from ‘xstrndup’
util-linux-2.41.3/text-utils/hexdump-parse.c:505:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:506:32: branch_true: ...to here
util-linux-2.41.3/include/xalloc.h:110:16: danger: ‘hcnext’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  108|   	if (!ret)
#  109|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#  110|-> 	return ret;
#  111|   }
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def57]
util-linux-2.41.3/include/xalloc.h:186:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(sz)’ where non-null expected
util-linux-2.41.3/login-utils/login.c:275:20: enter_function: entry to ‘get_thishost’
util-linux-2.41.3/login-utils/login.c:277:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/login.c:278:33: branch_true: ...to here
util-linux-2.41.3/login-utils/login.c:278:33: call_function: calling ‘xgethostname’ from ‘get_thishost’
#  184|   
#  185|   	name = xmalloc(sizeof(char) * sz);
#  186|-> 	if (gethostname(name, sz) != 0) {
#  187|   		free(name);
#  188|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
util-linux-2.41.3/lib/colors.c:391:12: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(name)'
util-linux-2.41.3/lib/colors.c:682:13: enter_function: entry to 'color_scheme_get_sequence'
util-linux-2.41.3/lib/colors.c:689:14: call_function: calling 'colors_get_scheme' from 'color_scheme_get_sequence'
#  389|   	cs->seq = seq;
#  390|   	cs->name = strdup(name);
#  391|-> 	if (!cs->name)
#  392|   		goto err;
#  393|   

Error: GCC_ANALYZER_WARNING: [#def59]
util-linux-2.41.3/lib/pager.c:305:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
util-linux-2.41.3/lib/pager.c:297:6: enter_function: entry to ‘pager_close’
util-linux-2.41.3/lib/pager.c:299:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lib/pager.c:302:9: call_function: inlined call to ‘wait_for_pager’ from ‘pager_close’
util-linux-2.41.3/lib/pager.c:302:9: call_function: inlined call to ‘wait_for_pager’ from ‘pager_close’
util-linux-2.41.3/lib/pager.c:305:9: danger: ‘1’ could be invalid
#  303|   
#  304|   	/* restore original output */
#  305|-> 	dup2(pager_process.org_out, STDOUT_FILENO);
#  306|   	dup2(pager_process.org_err, STDERR_FILENO);
#  307|   

Error: GCC_ANALYZER_WARNING: [#def60]
util-linux-2.41.3/lib/pager.c:306:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
util-linux-2.41.3/lib/pager.c:297:6: enter_function: entry to ‘pager_close’
util-linux-2.41.3/lib/pager.c:299:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lib/pager.c:302:9: call_function: inlined call to ‘wait_for_pager’ from ‘pager_close’
util-linux-2.41.3/lib/pager.c:302:9: call_function: inlined call to ‘wait_for_pager’ from ‘pager_close’
util-linux-2.41.3/lib/pager.c:306:9: danger: ‘2’ could be invalid
#  304|   	/* restore original output */
#  305|   	dup2(pager_process.org_out, STDOUT_FILENO);
#  306|-> 	dup2(pager_process.org_err, STDERR_FILENO);
#  307|   
#  308|   	close(pager_process.org_out);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def61]
util-linux-2.41.3/lib/path.c:695:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
util-linux-2.41.3/lib/path.c:1080:5: enter_function: entry to 'ul_path_readf_cpulist'
util-linux-2.41.3/lib/path.c:1086:14: call_function: calling 'ul_path_cpuparse' from 'ul_path_readf_cpulist'
#  693|   	else if (rc > 0) {
#  694|   		/* Remove trailing newline (usual in sysfs) */
#  695|-> 		if (*(buf + rc - 1) == '\n')
#  696|   			buf[--rc] = '\0';
#  697|   		else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
util-linux-2.41.3/lib/randutils.c:63:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'random_get_fd()'
util-linux-2.41.3/lib/randutils.c:100:5: enter_function: entry to 'ul_random_get_bytes'
util-linux-2.41.3/lib/randutils.c:127:12: branch_true: following 'true' branch...
util-linux-2.41.3/lib/randutils.c:135:26: branch_true: ...to here
util-linux-2.41.3/lib/randutils.c:135:26: call_function: calling 'random_get_fd' from 'ul_random_get_bytes'
util-linux-2.41.3/lib/randutils.c:135:26: return_function: returning to 'ul_random_get_bytes' from 'random_get_fd'
util-linux-2.41.3/lib/randutils.c:63:9: danger: 'random_get_fd()' leaks here; was opened at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   61|   	n_pid = getpid();
#   62|   	n_uid = getuid();
#   63|-> 	srand((n_pid << 16) ^ n_uid ^ tv.tv_sec ^ tv.tv_usec);
#   64|   
#   65|   #ifdef DO_JRAND_MIX

Error: GCC_ANALYZER_WARNING (CWE-416): [#def63]
util-linux-2.41.3/libblkid/src/partitions/partitions.c:331:9: warning[-Wanalyzer-use-after-free]: use after 'free' of 'tab'
util-linux-2.41.3/libblkid/src/partitions/partitions.c:586:12: enter_function: entry to 'partitions_probe'
util-linux-2.41.3/libblkid/src/partitions/partitions.c:599:12: branch_true: following 'true' branch...
util-linux-2.41.3/libblkid/src/partitions/partitions.c:600:17: branch_true: ...to here
util-linux-2.41.3/libblkid/src/partitions/partitions.c:600:17: call_function: calling 'partitions_init_data' from 'partitions_probe'
#  329|   		return;
#  330|   
#  331|-> 	tab->nparts--;
#  332|   	if (tab->nparts <= 0) {
#  333|   		list_del(&tab->t_tabs);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def64]
util-linux-2.41.3/libblkid/src/probe.c:279:9: warning[-Wanalyzer-double-free]: double-'free' of '*v.data'
util-linux-2.41.3/libblkid/src/probe.c:2108:13: enter_function: entry to 'blkid_probe_get_wholedisk_probe'
util-linux-2.41.3/libblkid/src/probe.c:2112:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2115:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2127:12: branch_true: following 'true' branch...
util-linux-2.41.3/libblkid/src/probe.c:2129:35: branch_true: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2132:20: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2135:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2137:34: call_function: calling 'blkid_new_probe_from_filename' from 'blkid_probe_get_wholedisk_probe'
#  277|   
#  278|   	list_del(&v->prvals);
#  279|-> 	free(v->data);
#  280|   
#  281|   	DBG(LOWPROBE, ul_debug(" free value %s", v->name));

Error: GCC_ANALYZER_WARNING (CWE-415): [#def65]
util-linux-2.41.3/libblkid/src/probe.c:2605:17: warning[-Wanalyzer-double-free]: double-'free' of '((struct blkid_hint *)((char *)MEM[(struct list_head *)pr_9(D) + 128B].next + 16))[576460752303423487].name'
util-linux-2.41.3/libblkid/src/probe.c:2108:13: enter_function: entry to 'blkid_probe_get_wholedisk_probe'
util-linux-2.41.3/libblkid/src/probe.c:2112:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2115:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2127:12: branch_true: following 'true' branch...
util-linux-2.41.3/libblkid/src/probe.c:2129:35: branch_true: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2132:20: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2135:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2137:34: call_function: calling 'blkid_new_probe_from_filename' from 'blkid_probe_get_wholedisk_probe'
# 2603|   						struct blkid_hint, hints);
# 2604|   		list_del(&h->hints);
# 2605|-> 		free(h->name);
# 2606|   		free(h);
# 2607|   	}

Error: GCC_ANALYZER_WARNING (CWE-415): [#def66]
util-linux-2.41.3/libblkid/src/probe.c:2606:17: warning[-Wanalyzer-double-free]: double-'free' of '((struct list_head *)pr)[8].next + -16'
util-linux-2.41.3/libblkid/src/probe.c:2108:13: enter_function: entry to 'blkid_probe_get_wholedisk_probe'
util-linux-2.41.3/libblkid/src/probe.c:2112:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2115:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2127:12: branch_true: following 'true' branch...
util-linux-2.41.3/libblkid/src/probe.c:2129:35: branch_true: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2132:20: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/probe.c:2135:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/probe.c:2137:34: call_function: calling 'blkid_new_probe_from_filename' from 'blkid_probe_get_wholedisk_probe'
# 2604|   		list_del(&h->hints);
# 2605|   		free(h->name);
# 2606|-> 		free(h);
# 2607|   	}
# 2608|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dmpipe[0]'
util-linux-2.41.3/libblkid/src/topology/dm.c:44:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:46:14: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:46:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:46:12: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:49:21: branch_true: following 'true' branch (when 'i != 3')...
util-linux-2.41.3/libblkid/src/topology/dm.c:51:26: branch_true: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:57:12: branch_false: following 'false' branch (when 'cmd' is non-NULL)...
util-linux-2.41.3/libblkid/src/topology/dm.c:59:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:59:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:64:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:123:17: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: danger: 'dmpipe[0]' leaks here
#  116|   
#  117|   	fclose(stream);
#  118|-> 	return 0;
#  119|   
#  120|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dmpipe[1]'
util-linux-2.41.3/libblkid/src/topology/dm.c:44:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:46:14: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:46:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:46:12: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:49:21: branch_true: following 'true' branch (when 'i != 3')...
util-linux-2.41.3/libblkid/src/topology/dm.c:51:26: branch_true: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:57:12: branch_false: following 'false' branch (when 'cmd' is non-NULL)...
util-linux-2.41.3/libblkid/src/topology/dm.c:59:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:59:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:64:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:123:17: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/dm.c:118:16: danger: 'dmpipe[1]' leaks here
#  116|   
#  117|   	fclose(stream);
#  118|-> 	return 0;
#  119|   
#  120|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lvpipe[0]'
util-linux-2.41.3/libblkid/src/topology/lvm.c:49:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:14: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:12: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:54:21: branch_true: following 'true' branch (when 'i != 3')...
util-linux-2.41.3/libblkid/src/topology/lvm.c:56:26: branch_true: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:62:12: branch_false: following 'false' branch (when 'cmd' is non-NULL)...
util-linux-2.41.3/libblkid/src/topology/lvm.c:65:19: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:66:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:69:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:69:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:74:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:129:12: branch_false: following 'false' branch (when 'stream' is NULL)...
util-linux-2.41.3/libblkid/src/topology/lvm.c:131:18: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:131:17: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:133:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:133:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: danger: 'lvpipe[0]' leaks here
#  123|   	fclose(stream);
#  124|   	close(lvpipe[1]);
#  125|-> 	return 0;
#  126|   
#  127|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lvpipe[1]'
util-linux-2.41.3/libblkid/src/topology/lvm.c:49:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:14: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:51:12: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:54:21: branch_true: following 'true' branch (when 'i != 3')...
util-linux-2.41.3/libblkid/src/topology/lvm.c:56:26: branch_true: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:62:12: branch_false: following 'false' branch (when 'cmd' is non-NULL)...
util-linux-2.41.3/libblkid/src/topology/lvm.c:65:19: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:66:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:69:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:69:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:74:17: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:129:12: branch_false: following 'false' branch (when 'stream' is NULL)...
util-linux-2.41.3/libblkid/src/topology/lvm.c:131:18: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:131:17: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:133:13: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:133:12: branch_false: following 'false' branch...
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: branch_false: ...to here
util-linux-2.41.3/libblkid/src/topology/lvm.c:125:16: danger: 'lvpipe[1]' leaks here
#  123|   	fclose(stream);
#  124|   	close(lvpipe[1]);
#  125|-> 	return 0;
#  126|   
#  127|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:362:24: warning[-Wanalyzer-malloc-leak]: leak of 'tty'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:352:1: enter_function: entry to 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:361:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: call_function: calling 'read_entry' from 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: return_function: returning to 'll2_update_login_time' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:12: branch_true: following 'true' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:365:17: branch_true: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:362:24: danger: 'tty' leaks here; was allocated at [(20)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/19)
#  360|   
#  361|   	if ((retval = open_database_rw(context , &db, error)) != 0)
#  362|-> 		return retval;
#  363|   
#  364|   	if ((retval = read_entry(db, user, 0, &tty, &rhost, &pam_service, error)) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def72]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:352:1: enter_function: entry to 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:361:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: call_function: calling 'read_entry' from 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: return_function: returning to 'll2_update_login_time' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: danger: use of uninitialized value 'pam_service' here
#  367|   	}
#  368|   
#  369|-> 	retval = write_entry(db, user, ll_time, tty, rhost, pam_service, error);
#  370|   
#  371|   	sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def73]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:352:1: enter_function: entry to 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:361:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: call_function: calling 'read_entry' from 'll2_update_login_time'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:23: return_function: returning to 'll2_update_login_time' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:364:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:369:18: danger: use of uninitialized value 'rhost' here
#  367|   	}
#  368|   
#  369|-> 	retval = write_entry(db, user, ll_time, tty, rhost, pam_service, error);
#  370|   
#  371|   	sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:520:24: warning[-Wanalyzer-malloc-leak]: leak of 'pam_service'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:509:1: enter_function: entry to 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:519:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: call_function: calling 'write_entry' from 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: return_function: returning to 'll2_rename_user' from 'write_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:12: branch_true: following 'true' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:528:17: branch_true: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:520:24: danger: 'pam_service' leaks here; was allocated at [(26)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/25)
#  518|   
#  519|   	if ((retval = open_database_rw(context, &db, error)) != 0)
#  520|-> 		return retval;
#  521|   
#  522|   	if ((retval = read_entry(db, user, &ll_time, &tty, &rhost, &pam_service, error)) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:520:24: warning[-Wanalyzer-malloc-leak]: leak of 'tty'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:509:1: enter_function: entry to 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:519:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:12: branch_true: following 'true' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:523:17: branch_true: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:520:24: danger: 'tty' leaks here; was allocated at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#  518|   
#  519|   	if ((retval = open_database_rw(context, &db, error)) != 0)
#  520|-> 		return retval;
#  521|   
#  522|   	if ((retval = read_entry(db, user, &ll_time, &tty, &rhost, &pam_service, error)) != 0) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def76]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:509:1: enter_function: entry to 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:519:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: danger: use of uninitialized value 'pam_service' here
#  525|   	}
#  526|   
#  527|-> 	if ((retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error)) != 0) {
#  528|   		sqlite3_close(db);
#  529|   		free(tty);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def77]
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:509:1: enter_function: entry to 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:519:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:23: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.41.3/liblastlog2/src/lastlog2.c:522:12: branch_false: following 'false' branch...
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: branch_false: ...to here
util-linux-2.41.3/liblastlog2/src/lastlog2.c:527:23: danger: use of uninitialized value 'rhost' here
#  525|   	}
#  526|   
#  527|-> 	if ((retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error)) != 0) {
#  528|   		sqlite3_close(db);
#  529|   		free(tty);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
util-linux-2.41.3/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_dir'
util-linux-2.41.3/libmount/src/fs.c:1957:5: enter_function: entry to 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1962:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1965:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1966:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
util-linux-2.41.3/libmount/src/fs.c:1972:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'mnt_fs_get_source' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_source'
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1972:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1974:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'mnt_fs_get_target' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_target'
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
#  163|   	memcpy(*dest, src, sz);
#  164|   	return 0;
#  165|-> }
#  166|   
#  167|   /* This function does NOT overwrite (replace) the string in @new, the string in

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
util-linux-2.41.3/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_fsname'
util-linux-2.41.3/libmount/src/fs.c:1957:5: enter_function: entry to 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1962:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1965:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1966:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
util-linux-2.41.3/libmount/src/fs.c:1972:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'mnt_fs_get_source' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_source'
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
#  163|   	memcpy(*dest, src, sz);
#  164|   	return 0;
#  165|-> }
#  166|   
#  167|   /* This function does NOT overwrite (replace) the string in @new, the string in

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
util-linux-2.41.3/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_type'
util-linux-2.41.3/libmount/src/fs.c:1957:5: enter_function: entry to 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1962:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1965:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1966:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
util-linux-2.41.3/libmount/src/fs.c:1972:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'mnt_fs_get_source' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_source'
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1972:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1974:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'mnt_fs_get_target' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_target'
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1974:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1976:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'mnt_fs_get_fstype' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1976:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_fstype'
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
#  163|   	memcpy(*dest, src, sz);
#  164|   	return 0;
#  165|-> }
#  166|   
#  167|   /* This function does NOT overwrite (replace) the string in @new, the string in

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
util-linux-2.41.3/libmount/src/fs.c:1981:12: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_opts'
util-linux-2.41.3/libmount/src/fs.c:1957:5: enter_function: entry to 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1962:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1965:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1966:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
util-linux-2.41.3/libmount/src/fs.c:1972:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'mnt_fs_get_source' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_source'
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1972:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1974:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'mnt_fs_get_target' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_target'
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1974:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1976:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'mnt_fs_get_fstype' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1976:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_fstype'
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1976:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1976:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1979:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1980:23: call_function: calling 'mnt_fs_strdup_options' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1980:23: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_strdup_options'
util-linux-2.41.3/libmount/src/fs.c:1981:12: danger: '*m.mnt_opts' leaks here; was allocated at [(61)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/60)
# 1979|   	errno = 0;
# 1980|   	m->mnt_opts = mnt_fs_strdup_options(fs);
# 1981|-> 	if (!m->mnt_opts && errno) {
# 1982|   		rc = -errno;
# 1983|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
util-linux-2.41.3/libmount/src/fs.c:1991:20: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_fsname'
util-linux-2.41.3/libmount/src/fs.c:1957:5: enter_function: entry to 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1962:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1965:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1966:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
util-linux-2.41.3/libmount/src/fs.c:1972:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'mnt_fs_get_source' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_source'
util-linux-2.41.3/libmount/src/fs.c:1972:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1972:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1972:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1974:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'mnt_fs_get_target' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_target'
util-linux-2.41.3/libmount/src/fs.c:1974:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1974:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1974:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1976:19: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'mnt_fs_get_fstype' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1976:19: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_fstype'
util-linux-2.41.3/libmount/src/fs.c:1976:19: call_function: calling 'update_str' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1976:19: return_function: returning to 'mnt_fs_to_mntent' from 'update_str'
util-linux-2.41.3/libmount/src/fs.c:1976:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/fs.c:1979:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/fs.c:1980:23: call_function: calling 'mnt_fs_strdup_options' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1980:23: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_strdup_options'
util-linux-2.41.3/libmount/src/fs.c:1986:23: call_function: calling 'mnt_fs_get_freq' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1986:23: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_freq'
util-linux-2.41.3/libmount/src/fs.c:1987:25: call_function: calling 'mnt_fs_get_passno' from 'mnt_fs_to_mntent'
util-linux-2.41.3/libmount/src/fs.c:1987:25: return_function: returning to 'mnt_fs_to_mntent' from 'mnt_fs_get_passno'
util-linux-2.41.3/libmount/src/fs.c:1989:12: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/fs.c:1990:33: branch_true: ...to here
util-linux-2.41.3/libmount/src/fs.c:1990:33: acquire_memory: allocated here
util-linux-2.41.3/libmount/src/fs.c:1991:20: danger: '*m.mnt_fsname' leaks here; was allocated at [(70)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/69)
# 1989|   	if (!m->mnt_fsname) {
# 1990|   		m->mnt_fsname = strdup("none");
# 1991|-> 		if (!m->mnt_fsname)
# 1992|   			goto err;
# 1993|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
util-linux-2.41.3/libmount/src/hook_idmap.c:465:25: warning[-Wanalyzer-malloc-leak]: leak of 'idmap'
util-linux-2.41.3/libmount/src/hook_idmap.c:379:12: enter_function: entry to 'hook_prepare_options'
util-linux-2.41.3/libmount/src/hook_idmap.c:392:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:395:15: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:396:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:399:17: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:400:12: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:401:25: branch_true: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:402:13: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:405:14: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:405:14: call_function: calling 'new_hook_data' from 'hook_prepare_options'
util-linux-2.41.3/libmount/src/hook_idmap.c:405:14: return_function: returning to 'hook_prepare_options' from 'new_hook_data'
util-linux-2.41.3/libmount/src/hook_idmap.c:406:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:410:12: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:410:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:417:15: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:418:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
util-linux-2.41.3/libmount/src/hook_idmap.c:431:20: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:431:50: branch_true: following 'true' branch (when 'tok' is non-NULL)...
util-linux-2.41.3/libmount/src/hook_idmap.c:435:26: branch_true: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:437:21: call_function: calling 'ul_startswith' from 'hook_prepare_options'
util-linux-2.41.3/libmount/src/hook_idmap.c:437:21: return_function: returning to 'hook_prepare_options' from 'ul_startswith'
util-linux-2.41.3/libmount/src/hook_idmap.c:437:20: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:440:25: branch_true: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:462:20: branch_false: following 'false' branch (when 'rc == 3')...
util-linux-2.41.3/libmount/src/hook_idmap.c:465:25: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:465:25: acquire_memory: allocated here
util-linux-2.41.3/libmount/src/hook_idmap.c:466:20: branch_false: following 'false' branch (when 'idmap' is non-NULL)...
util-linux-2.41.3/libmount/src/hook_idmap.c:469:17: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:431:50: branch_true: following 'true' branch (when 'tok' is non-NULL)...
util-linux-2.41.3/libmount/src/hook_idmap.c:435:26: branch_true: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:437:21: call_function: calling 'ul_startswith' from 'hook_prepare_options'
util-linux-2.41.3/libmount/src/hook_idmap.c:437:21: return_function: returning to 'hook_prepare_options' from 'ul_startswith'
util-linux-2.41.3/libmount/src/hook_idmap.c:437:20: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/hook_idmap.c:440:25: branch_true: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:462:20: branch_false: following 'false' branch (when 'rc == 3')...
util-linux-2.41.3/libmount/src/hook_idmap.c:465:25: branch_false: ...to here
util-linux-2.41.3/libmount/src/hook_idmap.c:465:25: danger: 'idmap' leaks here; was allocated at [(34)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/33)
#  463|   			goto err;
#  464|   
#  465|-> 		idmap = calloc(1, sizeof(*idmap));
#  466|   		if (!idmap)
#  467|   			goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
util-linux-2.41.3/libmount/src/optlist.c:428:9: warning[-Wanalyzer-malloc-leak]: leak of 'optlist_new_opt(mnt_new_optlist(), *opt.name,  <unknown>, *opt.value,  <unknown>, *opt.map, *opt.ent, 0)'
util-linux-2.41.3/libmount/src/optlist.c:1045:24: enter_function: entry to 'mnt_copy_optlist'
util-linux-2.41.3/libmount/src/optlist.c:1047:36: call_function: calling 'mnt_new_optlist' from 'mnt_copy_optlist'
util-linux-2.41.3/libmount/src/optlist.c:1047:36: return_function: returning to 'mnt_copy_optlist' from 'mnt_new_optlist'
util-linux-2.41.3/libmount/src/optlist.c:1052:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/optlist.c:1055:18: branch_false: ...to here
util-linux-2.41.3/libmount/src/optlist.c:1058:21: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/optlist.c:1060:9: branch_false: ...to here
util-linux-2.41.3/libmount/src/optlist.c:1064:16: call_function: calling 'mnt_optlist_next_opt' from 'mnt_copy_optlist'
util-linux-2.41.3/libmount/src/optlist.c:1064:16: return_function: returning to 'mnt_copy_optlist' from 'mnt_optlist_next_opt'
util-linux-2.41.3/libmount/src/optlist.c:1064:16: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/optlist.c:1070:38: branch_true: ...to here
util-linux-2.41.3/libmount/src/optlist.c:1067:22: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/optlist.c:1069:50: branch_true: ...to here
util-linux-2.41.3/libmount/src/optlist.c:1067:22: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/optlist.c:1068:48: branch_true: ...to here
util-linux-2.41.3/libmount/src/optlist.c:1067:22: call_function: calling 'optlist_new_opt' from 'mnt_copy_optlist'
util-linux-2.41.3/libmount/src/optlist.c:1067:22: return_function: returning to 'mnt_copy_optlist' from 'optlist_new_opt'
util-linux-2.41.3/libmount/src/optlist.c:1071:20: branch_true: following 'true' branch...
util-linux-2.41.3/libmount/src/optlist.c:1072:38: branch_true: ...to here
util-linux-2.41.3/libmount/src/optlist.c:428:9: danger: 'optlist_new_opt(mnt_new_optlist(), *opt.name,  <unknown>, *opt.value,  <unknown>, *opt.map, *opt.ent, 0)' leaks here; was allocated at [(32)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/31)
#  426|   		return NULL;
#  427|   
#  428|-> 	INIT_LIST_HEAD(&opt->opts);
#  429|   	opt->map = map;
#  430|   	opt->ent = ent;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
util-linux-2.41.3/libmount/src/tab.c:1196:22: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fs'
util-linux-2.41.3/libmount/src/tab.c:1089:19: enter_function: entry to 'mnt_table_find_mountpoint'
util-linux-2.41.3/libmount/src/tab.c:1102:12: branch_false: following 'false' branch...
util-linux-2.41.3/libmount/src/tab.c:1105:15: branch_false: ...to here
util-linux-2.41.3/libmount/src/tab.c:1106:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)...
util-linux-2.41.3/libmount/src/tab.c:1106:12: branch_false: ...to here
util-linux-2.41.3/libmount/src/tab.c:1113:22: call_function: calling 'mnt_table_find_target' from 'mnt_table_find_mountpoint'
# 1194|   		char *p;
# 1195|   
# 1196|-> 		if (!fs->target
# 1197|   		    || mnt_fs_is_swaparea(fs)
# 1198|   		    || mnt_fs_is_kernel(fs)

Error: GCC_ANALYZER_WARNING (CWE-416): [#def86]
util-linux-2.41.3/libmount/src/utils.c:574:31: warning[-Wanalyzer-use-after-free]: use after 'reallocarray' of 'p'
util-linux-2.41.3/libmount/src/utils.c:579:12: enter_function: entry to 'add_filesystem'
util-linux-2.41.3/libmount/src/utils.c:583:9: branch_true: following 'true' branch (when 'filesystems' is non-NULL)...
util-linux-2.41.3/libmount/src/utils.c:584:9: branch_true: ...to here
util-linux-2.41.3/libmount/src/utils.c:584:9: branch_true: following 'true' branch (when 'name' is non-NULL)...
util-linux-2.41.3/libmount/src/utils.c:586:13: branch_true: ...to here
util-linux-2.41.3/libmount/src/utils.c:598:28: release_memory: deallocated here
util-linux-2.41.3/libmount/src/utils.c:600:20: branch_true: following 'true' branch (when 'x' is NULL)...
util-linux-2.41.3/libmount/src/utils.c:601:25: branch_true: ...to here
util-linux-2.41.3/libmount/src/utils.c:611:9: call_function: calling 'mnt_free_filesystems' from 'add_filesystem'
#  572|   	if (!filesystems)
#  573|   		return;
#  574|-> 	for (p = filesystems; *p; p++)
#  575|   		free(*p);
#  576|   	free(filesystems);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: warning[-Wanalyzer-malloc-leak]: leak of 'yyptr'
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_true: following 'true' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1255:28: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1278:10: branch_false: following 'false' branch (when 'yystacksize <= 9999')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1280:7: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1287:11: acquire_memory: allocated here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1289:12: branch_false: following 'false' branch (when 'yyptr' is non-NULL)...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1294:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1294:12: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1307:10: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_true: following 'true' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1255:28: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1278:10: branch_false: following 'false' branch (when 'yystacksize <= 9999')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1280:7: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: danger: 'yyptr' leaks here; was allocated at [(35)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/34)
# 1289|           if (! yyptr)
# 1290|             YYNOMEM;
# 1291|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1292|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1293|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def88]
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_true: following 'true' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1255:28: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1278:10: branch_false: following 'false' branch (when 'yystacksize <= 9999')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1280:7: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1289:12: branch_false: following 'false' branch (when 'yyptr' is non-NULL)...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1291:9: danger: use of uninitialized value 'yyss' here
# 1289|           if (! yyptr)
# 1290|             YYNOMEM;
# 1291|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1292|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1293|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def89]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:81:66: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyvsp[1152921504606846975].param'
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:81:66: danger: use of uninitialized value 'yyvsp[1152921504606846975].param' here
#   79|   expr:
#   80|   	param			{ $$ = $1; }
#   81|-> 	| '(' expr ')'		{ $$ = $2; }
#   82|   	| expr T_AND expr	{ $$ = filter_new_expr(fltr, F_EXPR_AND, $1, $3); }
#   83|   	| expr T_OR expr	{ $$ = filter_new_expr(fltr, F_EXPR_OR, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def90]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:82:64: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:82:64: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   80|   	param			{ $$ = $1; }
#   81|   	| '(' expr ')'		{ $$ = $2; }
#   82|-> 	| expr T_AND expr	{ $$ = filter_new_expr(fltr, F_EXPR_AND, $1, $3); }
#   83|   	| expr T_OR expr	{ $$ = filter_new_expr(fltr, F_EXPR_OR, $1, $3); }
#   84|   	| T_NEG expr		{ $$ = filter_new_expr(fltr, F_EXPR_NEG, NULL, $2); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def91]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:83:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:83:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   81|   	| '(' expr ')'		{ $$ = $2; }
#   82|   	| expr T_AND expr	{ $$ = filter_new_expr(fltr, F_EXPR_AND, $1, $3); }
#   83|-> 	| expr T_OR expr	{ $$ = filter_new_expr(fltr, F_EXPR_OR, $1, $3); }
#   84|   	| T_NEG expr		{ $$ = filter_new_expr(fltr, F_EXPR_NEG, NULL, $2); }
#   85|   	| expr T_EQ expr	{ $$ = filter_new_expr(fltr, F_EXPR_EQ, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def92]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:85:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:85:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   83|   	| expr T_OR expr	{ $$ = filter_new_expr(fltr, F_EXPR_OR, $1, $3); }
#   84|   	| T_NEG expr		{ $$ = filter_new_expr(fltr, F_EXPR_NEG, NULL, $2); }
#   85|-> 	| expr T_EQ expr	{ $$ = filter_new_expr(fltr, F_EXPR_EQ, $1, $3); }
#   86|   	| expr T_NE expr	{ $$ = filter_new_expr(fltr, F_EXPR_NE, $1, $3); }
#   87|   	| expr T_LE expr	{ $$ = filter_new_expr(fltr, F_EXPR_LE, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def93]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:86:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:86:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   84|   	| T_NEG expr		{ $$ = filter_new_expr(fltr, F_EXPR_NEG, NULL, $2); }
#   85|   	| expr T_EQ expr	{ $$ = filter_new_expr(fltr, F_EXPR_EQ, $1, $3); }
#   86|-> 	| expr T_NE expr	{ $$ = filter_new_expr(fltr, F_EXPR_NE, $1, $3); }
#   87|   	| expr T_LE expr	{ $$ = filter_new_expr(fltr, F_EXPR_LE, $1, $3); }
#   88|   	| expr T_LT expr	{ $$ = filter_new_expr(fltr, F_EXPR_LT, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def94]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:87:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:87:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   85|   	| expr T_EQ expr	{ $$ = filter_new_expr(fltr, F_EXPR_EQ, $1, $3); }
#   86|   	| expr T_NE expr	{ $$ = filter_new_expr(fltr, F_EXPR_NE, $1, $3); }
#   87|-> 	| expr T_LE expr	{ $$ = filter_new_expr(fltr, F_EXPR_LE, $1, $3); }
#   88|   	| expr T_LT expr	{ $$ = filter_new_expr(fltr, F_EXPR_LT, $1, $3); }
#   89|   	| expr T_GE expr	{ $$ = filter_new_expr(fltr, F_EXPR_GE, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def95]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:88:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:88:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   86|   	| expr T_NE expr	{ $$ = filter_new_expr(fltr, F_EXPR_NE, $1, $3); }
#   87|   	| expr T_LE expr	{ $$ = filter_new_expr(fltr, F_EXPR_LE, $1, $3); }
#   88|-> 	| expr T_LT expr	{ $$ = filter_new_expr(fltr, F_EXPR_LT, $1, $3); }
#   89|   	| expr T_GE expr	{ $$ = filter_new_expr(fltr, F_EXPR_GE, $1, $3); }
#   90|   	| expr T_GT expr	{ $$ = filter_new_expr(fltr, F_EXPR_GT, $1, $3); }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def96]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:89:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:89:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   87|   	| expr T_LE expr	{ $$ = filter_new_expr(fltr, F_EXPR_LE, $1, $3); }
#   88|   	| expr T_LT expr	{ $$ = filter_new_expr(fltr, F_EXPR_LT, $1, $3); }
#   89|-> 	| expr T_GE expr	{ $$ = filter_new_expr(fltr, F_EXPR_GE, $1, $3); }
#   90|   	| expr T_GT expr	{ $$ = filter_new_expr(fltr, F_EXPR_GT, $1, $3); }
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-127): [#def97]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:90:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:90:65: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   88|   	| expr T_LT expr	{ $$ = filter_new_expr(fltr, F_EXPR_LT, $1, $3); }
#   89|   	| expr T_GE expr	{ $$ = filter_new_expr(fltr, F_EXPR_GE, $1, $3); }
#   90|-> 	| expr T_GT expr	{ $$ = filter_new_expr(fltr, F_EXPR_GT, $1, $3); }
#   91|   
#   92|   	| expr T_REG expr	{

Error: GCC_ANALYZER_WARNING (CWE-127): [#def98]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:95:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:93:20: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.y:95:33: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:95:33: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   93|   		if (filter_compile_param(fltr, (struct filter_param *) $3) != 0)
#   94|   			YYERROR;
#   95|-> 		$$ = filter_new_expr(fltr, F_EXPR_REG, $1, $3);
#   96|   	}
#   97|   

Error: GCC_ANALYZER_WARNING (CWE-127): [#def99]
util-linux-2.41.3/libsmartcols/src/filter-parser.y:101:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1328:6: branch_false: following 'false' branch (when 'yyn != -8')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1334:6: branch_true: following 'true' branch (when 'yychar == -2')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1337:16: branch_true: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1346:11: branch_false: following 'false' branch (when 'yychar != 256')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1358:17: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1365:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1368:6: branch_false: following 'false' branch (when 'yyn > 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1378:6: branch_false: following 'false' branch (when 'yyerrstatus == 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1385:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1249:6: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1313:6: branch_false: following 'false' branch (when 'yystate != 15')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1316:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1398:6: branch_false: following 'false' branch (when 'yyn != 0')...
util-linux-2.41.3/libsmartcols/src/filter-parser.c:1400:3: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:99:20: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-parser.y:101:33: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-parser.y:101:33: danger: out-of-bounds read from byte -16 till byte -9 but 'yyvsa' starts at byte 0
#   99|   		if (filter_compile_param(fltr, (struct filter_param *) $3) != 0)
#  100|   			YYERROR;
#  101|-> 		$$ = filter_new_expr(fltr, F_EXPR_NREG, $1, $3);
#  102|   	}
#  103|   ;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1483:54: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1470:21: enter_function: entry to 'yy_create_buffer'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1474:24: call_function: inlined call to 'yyalloc' from 'yy_create_buffer'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1475:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1478:2: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1483:54: danger: 'malloc(64)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1481|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 1482|   	 * we need to put in 2 end-of-buffer characters.
# 1483|-> 	 */
# 1484|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1485|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1483:54: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(64, yyscanner)'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1470:21: enter_function: entry to 'yy_create_buffer'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1474:24: call_function: calling 'yyalloc' from 'yy_create_buffer'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1474:24: return_function: returning to 'yy_create_buffer' from 'yyalloc'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1475:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1478:2: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1483:54: danger: 'yyalloc(64, yyscanner)' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1481|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 1482|   	 * we need to put in 2 end-of-buffer characters.
# 1483|-> 	 */
# 1484|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1485|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def102]
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1526:2: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1405:10: enter_function: entry to 'yyrestart'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1410:16: call_function: calling 'yyensure_buffer_stack' from 'yyrestart'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1410:16: return_function: returning to 'yyrestart' from 'yyensure_buffer_stack'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1412:27: call_function: calling 'yy_create_buffer' from 'yyrestart'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1412:27: return_function: returning to 'yyrestart' from 'yy_create_buffer'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1415:2: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1415:2: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1415:2: call_function: calling 'yy_init_buffer' from 'yyrestart'
# 1524|   
# 1525|   	yy_flush_buffer( b , yyscanner);
# 1526|-> 
# 1527|   	b->yy_input_file = file;
# 1528|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1744:26: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(n)'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1728:17: enter_function: entry to 'yy_scan_bytes'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1737:24: call_function: inlined call to 'yyalloc' from 'yy_scan_bytes'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1738:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1738:12: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1746:6: call_function: calling 'yy_scan_buffer' from 'yy_scan_bytes'
# 1742|   	for ( i = 0; i < _yybytes_len; ++i )
# 1743|   		buf[i] = yybytes[i];
# 1744|-> 
# 1745|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1744:26: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(n,  yyscanner)'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1728:17: enter_function: entry to 'yy_scan_bytes'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1737:24: call_function: calling 'yyalloc' from 'yy_scan_bytes'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1737:24: return_function: returning to 'yy_scan_bytes' from 'yyalloc'
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1738:12: branch_false: following 'false' branch...
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1738:12: branch_false: ...to here
util-linux-2.41.3/libsmartcols/src/filter-scanner.c:1746:6: call_function: calling 'yy_scan_buffer' from 'yy_scan_bytes'
# 1742|   	for ( i = 0; i < _yybytes_len; ++i )
# 1743|   		buf[i] = yybytes[i];
# 1744|-> 
# 1745|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1746|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
util-linux-2.41.3/libsmartcols/src/print.c:544:71: warning[-Wanalyzer-null-dereference]: dereference of NULL 'data'
util-linux-2.41.3/libsmartcols/src/print.c:1142:12: enter_function: entry to 'print_tree_line'
util-linux-2.41.3/libsmartcols/src/print.c:1155:14: call_function: calling 'print_line' from 'print_tree_line'
#  542|   	case SCOLS_JSON_BOOLEAN_OPTIONAL:
#  543|   		/* name: true|false|null */
#  544|-> 		if (cl->json_type == SCOLS_JSON_BOOLEAN_OPTIONAL && (!*data || !strcmp(data, "-"))) {
#  545|   			ul_jsonwrt_value_null(&tb->json, name);
#  546|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def106]
util-linux-2.41.3/libsmartcols/src/print.c:548:42: warning[-Wanalyzer-null-dereference]: dereference of NULL 'data'
util-linux-2.41.3/libsmartcols/src/print.c:1142:12: enter_function: entry to 'print_tree_line'
util-linux-2.41.3/libsmartcols/src/print.c:1155:14: call_function: calling 'print_line' from 'print_tree_line'
#  546|   		} else {
#  547|   			ul_jsonwrt_value_boolean(&tb->json, name,
#  548|-> 					!*data ? 0 :
#  549|   					*data == '0' ? 0 :
#  550|   					*data == 'N' || *data == 'n' ? 0 : 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
util-linux-2.41.3/login-utils/chfn.c:216:1: warning[-Wanalyzer-malloc-leak]: leak of ‘gecos’
util-linux-2.41.3/login-utils/chfn.c:396:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/chfn.c:414:9: call_function: calling ‘parse_argv’ from ‘main’
util-linux-2.41.3/login-utils/chfn.c:414:9: return_function: returning to ‘main’ from ‘parse_argv’
util-linux-2.41.3/login-utils/chfn.c:415:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/chfn.c:416:26: branch_true: ...to here
util-linux-2.41.3/login-utils/chfn.c:417:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/chfn.c:420:32: branch_false: ...to here
util-linux-2.41.3/login-utils/chfn.c:427:9: call_function: calling ‘parse_passwd’ from ‘main’
#  214|   	 *  not be changed by this version of chfn.  */
#  215|   	ctl->oldf.other = strsep(&gecos, ",");
#  216|-> }
#  217|   
#  218|   /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def108]
util-linux-2.41.3/login-utils/last.c:196:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
util-linux-2.41.3/login-utils/last.c:968:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/last.c:1093:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/last.c:1096:12: branch_false: ...to here
util-linux-2.41.3/login-utils/last.c:1096:12: branch_true: following ‘true’ branch (when ‘files’ is NULL)...
util-linux-2.41.3/login-utils/last.c:1097:25: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1097:25: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1097:25: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/login-utils/last.c:1098:35: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1098:35: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.41.3/login-utils/last.c:1101:21: branch_true: following ‘true’ branch (when ‘i < nfiles’)...
util-linux-2.41.3/login-utils/last.c:1102:17: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1103:17: call_function: calling ‘process_wtmp_file’ from ‘main’
#  194|   	off_t o;
#  195|   
#  196|-> 	if (quit == NULL && u != NULL) {
#  197|   		/*
#  198|   		 *	Normal read.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
util-linux-2.41.3/login-utils/last.c:196:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
util-linux-2.41.3/login-utils/last.c:968:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/last.c:1093:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/last.c:1096:12: branch_false: ...to here
util-linux-2.41.3/login-utils/last.c:1096:12: branch_true: following ‘true’ branch (when ‘files’ is NULL)...
util-linux-2.41.3/login-utils/last.c:1097:25: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1097:25: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1097:25: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/login-utils/last.c:1098:35: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1098:35: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.41.3/login-utils/last.c:1101:21: branch_true: following ‘true’ branch (when ‘i < nfiles’)...
util-linux-2.41.3/login-utils/last.c:1102:17: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1103:17: call_function: calling ‘process_wtmp_file’ from ‘main’
#  194|   	off_t o;
#  195|   
#  196|-> 	if (quit == NULL && u != NULL) {
#  197|   		/*
#  198|   		 *	Normal read.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def110]
util-linux-2.41.3/login-utils/last.c:1042:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘files’
util-linux-2.41.3/login-utils/last.c:968:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/last.c:1019:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/login-utils/last.c:1022:17: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1022:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1022:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/login-utils/last.c:1040:28: branch_true: following ‘true’ branch (when ‘files’ is NULL)...
util-linux-2.41.3/login-utils/last.c:1041:41: branch_true: ...to here
util-linux-2.41.3/login-utils/last.c:1041:41: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1041:41: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/login-utils/last.c:1042:43: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.41.3/login-utils/last.c:1042:43: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.41.3/login-utils/last.c:1042:25: danger: ‘files + nfiles * 8’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
# 1040|   			if (!files)
# 1041|   				files = xmalloc(sizeof(char *) * argc);
# 1042|-> 			files[nfiles++] = xstrdup(optarg);
# 1043|   			break;
# 1044|   		case 'd':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def111]
util-linux-2.41.3/login-utils/login.c:239:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘environ’
util-linux-2.41.3/login-utils/login.c:222:13: enter_function: entry to ‘process_title_init’
util-linux-2.41.3/login-utils/login.c:236:19: call_function: calling ‘xmalloc’ from ‘process_title_init’
util-linux-2.41.3/login-utils/login.c:236:19: return_function: returning to ‘process_title_init’ from ‘xmalloc’
util-linux-2.41.3/login-utils/login.c:238:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/login.c:239:24: branch_true: ...to here
util-linux-2.41.3/login-utils/login.c:239:30: call_function: calling ‘xstrdup’ from ‘process_title_init’
util-linux-2.41.3/login-utils/login.c:239:30: return_function: returning to ‘process_title_init’ from ‘xstrdup’
util-linux-2.41.3/login-utils/login.c:239:17: danger: ‘environ + (long unsigned int)i * 8’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#  237|   
#  238|   	for (i = 0; envp[i] != NULL; i++)
#  239|-> 		environ[i] = xstrdup(envp[i]);
#  240|   	environ[i] = NULL;
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
util-linux-2.41.3/login-utils/login.c:240:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘environ’
util-linux-2.41.3/login-utils/login.c:222:13: enter_function: entry to ‘process_title_init’
util-linux-2.41.3/login-utils/login.c:236:19: call_function: calling ‘xmalloc’ from ‘process_title_init’
util-linux-2.41.3/login-utils/login.c:236:19: return_function: returning to ‘process_title_init’ from ‘xmalloc’
util-linux-2.41.3/login-utils/login.c:238:21: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:240:16: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:240:9: danger: ‘environ + (long unsigned int)i * 8’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#  238|   	for (i = 0; envp[i] != NULL; i++)
#  239|   		environ[i] = xstrdup(envp[i]);
#  240|-> 	environ[i] = NULL;
#  241|   
#  242|   	if (i > 0)

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def113]
util-linux-2.41.3/login-utils/login.c:455:17: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘i’
util-linux-2.41.3/login-utils/login.c:510:13: enter_function: entry to ‘init_tty’
util-linux-2.41.3/login-utils/login.c:530:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:530:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:532:14: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:530:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:530:13: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:530:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:549:13: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:577:9: release_resource: first ‘close’ here
util-linux-2.41.3/login-utils/login.c:586:9: call_function: calling ‘open_tty’ from ‘init_tty’
#  453|   
#  454|   	for (i = 0; i < fd; i++)
#  455|-> 		close(i);
#  456|   	for (i = 0; i < 3; i++)
#  457|   		if (fd != i)

Error: GCC_ANALYZER_WARNING: [#def114]
util-linux-2.41.3/login-utils/login.c:458:25: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘i’
util-linux-2.41.3/login-utils/login.c:439:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:444:14: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:444:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:450:17: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:454:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/login.c:455:17: branch_true: ...to here
util-linux-2.41.3/login-utils/login.c:455:17: release_resource: closed here
util-linux-2.41.3/login-utils/login.c:454:21: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/login.c:454:21: branch_false: ...to here
util-linux-2.41.3/login-utils/login.c:456:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
util-linux-2.41.3/login-utils/login.c:457:20: branch_true: ...to here
util-linux-2.41.3/login-utils/login.c:457:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/login.c:458:25: branch_true: ...to here
util-linux-2.41.3/login-utils/login.c:458:25: danger: ‘i’ could be invalid
#  456|   	for (i = 0; i < 3; i++)
#  457|   		if (fd != i)
#  458|-> 			dup2(fd, i);
#  459|   	if (fd >= 3)
#  460|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def115]
util-linux-2.41.3/login-utils/lslogins.c:522:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ary’
util-linux-2.41.3/login-utils/lslogins.c:488:12: enter_function: entry to ‘parse_utmpx’
util-linux-2.41.3/login-utils/lslogins.c:502:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:503:30: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:503:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:504:25: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:505:31: call_function: calling ‘xreallocarray’ from ‘parse_utmpx’
util-linux-2.41.3/login-utils/lslogins.c:505:31: return_function: returning to ‘parse_utmpx’ from ‘xreallocarray’
util-linux-2.41.3/login-utils/lslogins.c:515:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:520:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:520:20: branch_true: following ‘true’ branch (when ‘i == imax’)...
util-linux-2.41.3/login-utils/lslogins.c:521:50: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:521:31: call_function: calling ‘xreallocarray’ from ‘parse_utmpx’
util-linux-2.41.3/login-utils/lslogins.c:521:31: return_function: returning to ‘parse_utmpx’ from ‘xreallocarray’
util-linux-2.41.3/login-utils/lslogins.c:522:17: danger: dereference of NULL ‘ary + i * 384’
#  520|   		if (i == imax)
#  521|   			ary = xreallocarray(ary, imax *= 2, sizeof(struct utmpx));
#  522|-> 		ary[i] = *u;
#  523|   	}
#  524|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
util-linux-2.41.3/login-utils/lslogins.c:806:13: warning[-Wanalyzer-malloc-leak]: leak of ‘get_next_user(ctl)’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1784:21: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1784:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1787:17: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1795:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1798:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1798:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1803:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1803:19: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/login-utils/lslogins.c:1818:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1818:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1822:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1822:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1825:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1825:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1828:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1828:13: call_function: calling ‘create_usertree’ from ‘main’
#  804|   	/* nfsnobody is an exception to the UID_MAX limit.  This is "nobody" on
#  805|   	 * some systems; the decisive point is the UID - 65534 */
#  806|-> 	if ((lslogins_flag & F_USRAC) &&
#  807|   	    strcmp("nfsnobody", pwd->pw_name) != 0 &&
#  808|   	    uid != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
util-linux-2.41.3/login-utils/lslogins.c:840:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1784:21: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1784:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1787:17: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1795:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1798:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1798:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1803:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1803:19: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/login-utils/lslogins.c:1818:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1818:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1822:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1822:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1825:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1825:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1828:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1828:13: call_function: calling ‘create_usertree’ from ‘main’
#  838|   
#  839|   	while (n < ncolumns) {
#  840|-> 		switch (columns[n++]) {
#  841|   		case COL_USER:
#  842|   			if (!user->login)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
util-linux-2.41.3/login-utils/lslogins.c:857:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1784:21: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1784:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1787:17: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1795:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1798:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1798:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1803:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1803:19: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/login-utils/lslogins.c:1818:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1818:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1822:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1822:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1825:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1825:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1828:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1828:13: call_function: calling ‘create_usertree’ from ‘main’
#  855|   		case COL_SGROUPS:
#  856|   		case COL_SGIDS:
#  857|-> 			if (!user->nsgroups &&
#  858|   			    get_sgroups(&user->sgroups, &user->nsgroups, pwd) < 0)
#  859|   				err(EXIT_FAILURE, _("failed to get supplementary groups"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
util-linux-2.41.3/login-utils/lslogins.c:1068:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.41.3/login-utils/lslogins.c:1572:5: enter_function: entry to ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1577:40: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1648:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1649:9: call_function: inlined call to ‘err_columns_index’ from ‘main’
util-linux-2.41.3/login-utils/lslogins.c:1649:9: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1651:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/login-utils/lslogins.c:1783:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1783:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1784:21: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1784:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1787:17: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1795:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1798:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1798:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1803:20: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1803:19: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1814:12: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.41.3/login-utils/lslogins.c:1818:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1818:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1822:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1822:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1825:13: branch_false: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1825:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/lslogins.c:1826:17: branch_true: ...to here
util-linux-2.41.3/login-utils/lslogins.c:1826:17: call_function: calling ‘get_ulist’ from ‘main’
# 1066|   
# 1067|   	if (logins) {
# 1068|-> 		while ((u = strtok(logins, ","))) {
# 1069|   			logins = NULL;
# 1070|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def120]
util-linux-2.41.3/login-utils/su-common.c:818:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(strlen(shell_basename) + 2)’
util-linux-2.41.3/login-utils/su-common.c:796:13: enter_function: entry to ‘run_shell’
util-linux-2.41.3/login-utils/su-common.c:802:29: call_function: calling ‘xcalloc’ from ‘run_shell’
util-linux-2.41.3/login-utils/su-common.c:802:29: return_function: returning to ‘run_shell’ from ‘xcalloc’
util-linux-2.41.3/login-utils/su-common.c:810:15: call_function: calling ‘xstrdup’ from ‘run_shell’
util-linux-2.41.3/login-utils/su-common.c:810:15: return_function: returning to ‘run_shell’ from ‘xstrdup’
util-linux-2.41.3/login-utils/su-common.c:812:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/su-common.c:816:34: branch_true: ...to here
util-linux-2.41.3/login-utils/su-common.c:817:24: call_function: calling ‘xmalloc’ from ‘run_shell’
util-linux-2.41.3/login-utils/su-common.c:817:24: return_function: returning to ‘run_shell’ from ‘xmalloc’
util-linux-2.41.3/login-utils/su-common.c:818:17: danger: ‘xmalloc(strlen(shell_basename) + 2)’ could be NULL: unchecked value from [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#  816|   		shell_basename = basename(tmp);
#  817|   		arg0 = xmalloc(strlen(shell_basename) + 2);
#  818|-> 		arg0[0] = '-';
#  819|   		strcpy(arg0 + 1, shell_basename);
#  820|   		args[0] = arg0;

Error: GCC_ANALYZER_WARNING: [#def121]
util-linux-2.41.3/login-utils/sulogin.c:726:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’
util-linux-2.41.3/login-utils/sulogin.c:696:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:698:13: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:698:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:701:19: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:707:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/sulogin.c:708:28: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:718:20: branch_true: following ‘true’ branch (when ‘fd > 0’)...
util-linux-2.41.3/login-utils/sulogin.c:718:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:718:41: release_resource: closed here
util-linux-2.41.3/login-utils/sulogin.c:719:20: branch_false: following ‘false’ branch (when ‘fd == 1’)...
util-linux-2.41.3/login-utils/sulogin.c:722:17: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:726:9: danger: ‘0’ could be invalid
#  724|   	}
#  725|   notty:
#  726|-> 	dup2(fd, STDIN_FILENO);
#  727|   	dup2(fd, STDOUT_FILENO);
#  728|   	dup2(fd, STDERR_FILENO);

Error: GCC_ANALYZER_WARNING: [#def122]
util-linux-2.41.3/login-utils/sulogin.c:727:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
util-linux-2.41.3/login-utils/sulogin.c:696:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:698:13: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:698:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:701:19: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:707:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/sulogin.c:708:28: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:718:20: branch_true: following ‘true’ branch (when ‘fd > 0’)...
util-linux-2.41.3/login-utils/sulogin.c:718:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:719:20: branch_true: following ‘true’ branch (when ‘fd != 1’)...
util-linux-2.41.3/login-utils/sulogin.c:719:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:719:41: release_resource: closed here
util-linux-2.41.3/login-utils/sulogin.c:720:20: branch_false: following ‘false’ branch (when ‘fd <= 2’)...
util-linux-2.41.3/login-utils/sulogin.c:722:17: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:727:9: danger: ‘1’ could be invalid
#  725|   notty:
#  726|   	dup2(fd, STDIN_FILENO);
#  727|-> 	dup2(fd, STDOUT_FILENO);
#  728|   	dup2(fd, STDERR_FILENO);
#  729|   	con->fd = STDIN_FILENO;

Error: GCC_ANALYZER_WARNING: [#def123]
util-linux-2.41.3/login-utils/sulogin.c:728:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
util-linux-2.41.3/login-utils/sulogin.c:696:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:698:13: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:698:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/login-utils/sulogin.c:701:19: branch_false: ...to here
util-linux-2.41.3/login-utils/sulogin.c:707:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/login-utils/sulogin.c:708:28: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:718:20: branch_true: following ‘true’ branch (when ‘fd > 0’)...
util-linux-2.41.3/login-utils/sulogin.c:718:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:719:20: branch_true: following ‘true’ branch (when ‘fd != 1’)...
util-linux-2.41.3/login-utils/sulogin.c:719:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:720:20: branch_true: following ‘true’ branch (when ‘fd > 2’)...
util-linux-2.41.3/login-utils/sulogin.c:720:41: branch_true: ...to here
util-linux-2.41.3/login-utils/sulogin.c:720:41: release_resource: closed here
util-linux-2.41.3/login-utils/sulogin.c:728:9: danger: ‘2’ could be invalid
#  726|   	dup2(fd, STDIN_FILENO);
#  727|   	dup2(fd, STDOUT_FILENO);
#  728|-> 	dup2(fd, STDERR_FILENO);
#  729|   	con->fd = STDIN_FILENO;
#  730|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
util-linux-2.41.3/lsfd-cmd/cdev.c:218:50: warning[-Wanalyzer-malloc-leak]: leak of ‘read_ttydrv(&line)’
util-linux-2.41.3/lsfd-cmd/cdev.c:221:13: enter_function: entry to ‘read_tty_drivers’
util-linux-2.41.3/lsfd-cmd/cdev.c:225:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/lsfd-cmd/cdev.c:226:41: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/cdev.c:226:41: call_function: calling ‘read_ttydrv’ from ‘read_tty_drivers’
util-linux-2.41.3/lsfd-cmd/cdev.c:226:41: return_function: returning to ‘read_tty_drivers’ from ‘read_ttydrv’
util-linux-2.41.3/lsfd-cmd/cdev.c:227:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/lsfd-cmd/cdev.c:228:25: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/cdev.c:218:50: danger: ‘read_ttydrv(&line)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#  216|   	}
#  217|   
#  218|-> 	return new_ttydrv(major, minor_range[0], minor_range[1], name);
#  219|   }
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def125]
util-linux-2.41.3/lsfd-cmd/lsfd.c:731:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *class.size)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1947:13: enter_function: entry to ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1961:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1979:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
#  729|   	assert(class);
#  730|   	file = xcalloc(1, class->size);
#  731|-> 	file->class = class;
#  732|   
#  733|   	file->proc = proc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def126]
util-linux-2.41.3/lsfd-cmd/lsfd.c:750:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, readlink_error_class.size)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1947:13: enter_function: entry to ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1961:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1979:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
#  748|   
#  749|   	file = xcalloc(1, readlink_error_class.size);
#  750|-> 	file->class = &readlink_error_class;
#  751|   
#  752|   	file->proc = proc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
util-linux-2.41.3/lsfd-cmd/lsfd.c:770:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, stat_error_class.size)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1947:13: enter_function: entry to ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1961:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1979:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
#  768|   
#  769|   	file = xcalloc(1, stat_error_class.size);
#  770|-> 	file->class = &stat_error_class;
#  771|   
#  772|   	file->proc = proc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
util-linux-2.41.3/lsfd-cmd/lsfd.c:790:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *old_9(D)->class.size)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1947:13: enter_function: entry to ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1956:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1958:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.41.3/lsfd-cmd/lsfd.c:1961:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/lsfd-cmd/lsfd.c:1979:13: branch_false: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:1984:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
#  788|   
#  789|   	INIT_LIST_HEAD(&file->files);
#  790|-> 	file->proc = old->proc;
#  791|   	list_add_tail(&file->files, &old->proc->files);
#  792|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def129]
util-linux-2.41.3/lsfd-cmd/lsfd.c:2093:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘outarg’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2519:5: enter_function: entry to ‘main’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2524:16: release_memory: ‘filter_expr’ is NULL
util-linux-2.41.3/lsfd-cmd/lsfd.c:2573:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2574:17: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:2594:25: call_function: calling ‘parse_pids’ from ‘main’
# 2091|   	       && (isspace((unsigned char)*next) || *next == ','))
# 2092|   		next++;
# 2093|-> 	if (*next != '\0')
# 2094|   		parse_pids(next, pids, count);
# 2095|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
util-linux-2.41.3/lsfd-cmd/lsfd.c:2286:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_counter_spec(optarg)’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2519:5: enter_function: entry to ‘main’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2573:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/lsfd-cmd/lsfd.c:2574:17: branch_true: ...to here
util-linux-2.41.3/lsfd-cmd/lsfd.c:2620:50: call_function: calling ‘new_counter_spec’ from ‘main’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2620:50: return_function: returning to ‘main’ from ‘new_counter_spec’
util-linux-2.41.3/lsfd-cmd/lsfd.c:2286:13: danger: ‘new_counter_spec(optarg)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/21)
# 2284|   	struct counter_spec *spec;
# 2285|   
# 2286|-> 	if (spec_str[0] == '\0')
# 2287|   		errx(EXIT_FAILURE,
# 2288|   		     _("too short counter specification: -C/--counter %s"),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def131]
util-linux-2.41.3/misc-utils/blkid.c:889:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8)’
util-linux-2.41.3/misc-utils/blkid.c:689:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/blkid.c:862:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/blkid.c:866:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/blkid.c:867:35: branch_true: ...to here
util-linux-2.41.3/misc-utils/blkid.c:867:27: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.41.3/misc-utils/blkid.c:867:27: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.41.3/misc-utils/blkid.c:868:24: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/blkid.c:869:42: branch_true: ...to here
util-linux-2.41.3/misc-utils/blkid.c:872:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/blkid.c:874:34: branch_false: ...to here
util-linux-2.41.3/misc-utils/blkid.c:889:25: danger: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8) + (long unsigned int)numdev * 8’
#  887|   				continue;
#  888|   
#  889|-> 			devices[numdev++] = dev;
#  890|   		}
#  891|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def132]
util-linux-2.41.3/misc-utils/cal.c:1085:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208)’
util-linux-2.41.3/misc-utils/cal.c:1116:13: enter_function: entry to ‘yearly’
util-linux-2.41.3/misc-utils/cal.c:1130:9: call_function: calling ‘monthly’ from ‘yearly’
# 1083|   
# 1084|   	for (i = 0; i < ctl->months_in_row - 1; i++)
# 1085|-> 		ms[i].next = &ms[i + 1];
# 1086|   
# 1087|   	rows = (ctl->num_months - 1) / ctl->months_in_row;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
util-linux-2.41.3/misc-utils/enosys.c:114:36: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 25, & ioctls, 1)’
util-linux-2.41.3/misc-utils/enosys.c:154:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/enosys.c:182:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/enosys.c:183:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/enosys.c:192:35: call_function: calling ‘parse_block’ from ‘main’
util-linux-2.41.3/misc-utils/enosys.c:192:35: return_function: returning to ‘main’ from ‘parse_block’
util-linux-2.41.3/misc-utils/enosys.c:114:36: danger: ‘parse_block(optarg, 25, & ioctls, 1)’ leaks here; was allocated at [(24)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/23)
#  112|   	colon = strchr(s, ':');
#  113|   	if (colon) {
#  114|-> 		name = xstrndup(s, colon - s);
#  115|   		error_name = colon + 1;
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
util-linux-2.41.3/misc-utils/enosys.c:114:36: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 38, & syscalls, 385)’
util-linux-2.41.3/misc-utils/enosys.c:154:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/enosys.c:182:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/enosys.c:183:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/enosys.c:185:35: call_function: calling ‘parse_block’ from ‘main’
util-linux-2.41.3/misc-utils/enosys.c:185:35: return_function: returning to ‘main’ from ‘parse_block’
util-linux-2.41.3/misc-utils/enosys.c:114:36: danger: ‘parse_block(optarg, 38, & syscalls, 385)’ leaks here; was allocated at [(24)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/23)
#  112|   	colon = strchr(s, ':');
#  113|   	if (colon) {
#  114|-> 		name = xstrndup(s, colon - s);
#  115|   		error_name = colon + 1;
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
util-linux-2.41.3/misc-utils/enosys.c:134:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 25, & ioctls, 1)’
util-linux-2.41.3/misc-utils/enosys.c:154:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/enosys.c:182:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/enosys.c:183:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/enosys.c:192:35: call_function: calling ‘parse_block’ from ‘main’
util-linux-2.41.3/misc-utils/enosys.c:192:35: return_function: returning to ‘main’ from ‘parse_block’
util-linux-2.41.3/misc-utils/enosys.c:134:42: danger: ‘parse_block(optarg, 25, & ioctls, 1)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/14)
#  132|   	found = 0;
#  133|   	for (i = 0; i < n_entities; i++) {
#  134|-> 		if (strcmp(name, entities[i].name) == 0) {
#  135|   			blocked_number = entities[i].number;
#  136|   			found = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
util-linux-2.41.3/misc-utils/enosys.c:134:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 38, & syscalls, 385)’
util-linux-2.41.3/misc-utils/enosys.c:154:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/enosys.c:182:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/enosys.c:183:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/enosys.c:185:35: call_function: calling ‘parse_block’ from ‘main’
util-linux-2.41.3/misc-utils/enosys.c:185:35: return_function: returning to ‘main’ from ‘parse_block’
util-linux-2.41.3/misc-utils/enosys.c:134:42: danger: ‘parse_block(optarg, 38, & syscalls, 385)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  132|   	found = 0;
#  133|   	for (i = 0; i < n_entities; i++) {
#  134|-> 		if (strcmp(name, entities[i].name) == 0) {
#  135|   			blocked_number = entities[i].number;
#  136|   			found = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
util-linux-2.41.3/misc-utils/enosys.c:151:16: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
util-linux-2.41.3/misc-utils/enosys.c:154:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/enosys.c:182:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/enosys.c:183:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/enosys.c:185:35: call_function: calling ‘parse_block’ from ‘main’
#  149|   		free((char *)name);
#  150|   
#  151|-> 	return blocked;
#  152|   }
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def138]
util-linux-2.41.3/misc-utils/getopt.c:422:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ctl.optstr’ where non-null expected
util-linux-2.41.3/misc-utils/getopt.c:371:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/getopt.c:404:12: branch_false: following ‘false’ branch (when ‘argc != 1’)...
util-linux-2.41.3/misc-utils/getopt.c:416:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/getopt.c:416:9: call_function: calling ‘add_longopt’ from ‘main’
util-linux-2.41.3/misc-utils/getopt.c:416:9: return_function: returning to ‘main’ from ‘add_longopt’
util-linux-2.41.3/misc-utils/getopt.c:421:30: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/misc-utils/getopt.c:421:30: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/misc-utils/getopt.c:422:17: danger: argument 1 (‘xmalloc(strlen(argv[1]) + 1)’) from [(18)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/17) could be NULL where non-null expected
#  420|   		ctl.quote = 0;
#  421|   		ctl.optstr = xmalloc(strlen(argv[1]) + 1);
#  422|-> 		strcpy(ctl.optstr, argv[1] + strspn(argv[1], "-+"));
#  423|   		argv[1] = argv[0];
#  424|   		return generate_output(&ctl, argv + 1, argc - 1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def139]
util-linux-2.41.3/misc-utils/hardlink.c:532:9: warning[-Wanalyzer-null-argument]: use of NULL ‘xcalloc((long unsigned int)n, 8)’ where non-null expected
util-linux-2.41.3/misc-utils/hardlink.c:1073:13: enter_function: entry to ‘visitor’
util-linux-2.41.3/misc-utils/hardlink.c:1081:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/hardlink.c:1081:12: branch_false: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1084:16: branch_true: following ‘true’ branch (when ‘master’ is non-NULL)...
util-linux-2.41.3/misc-utils/hardlink.c:1088:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1089:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/hardlink.c:1089:20: branch_false: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1093:26: call_function: inlined call to ‘count_nodes’ from ‘visitor’
util-linux-2.41.3/misc-utils/hardlink.c:1094:20: branch_false: following ‘false’ branch (when ‘ct != 0’)...
util-linux-2.41.3/misc-utils/hardlink.c:1098:26: branch_false: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1110:44: branch_true: following ‘true’ branch (when ‘other’ is non-NULL)...
util-linux-2.41.3/misc-utils/hardlink.c:1113:25: branch_true: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1115:25: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/hardlink.c:1116:25: branch_true: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1116:25: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/hardlink.c:1118:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1118:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/hardlink.c:1122:30: branch_false: ...to here
util-linux-2.41.3/misc-utils/hardlink.c:1122:30: call_function: calling ‘file_may_link_to’ from ‘visitor’
#  530|   	}
#  531|   
#  532|-> 	qsort(table, n, sizeof(char *), cmp_xattr_name_ptrs);
#  533|   
#  534|   	return table;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def140]
util-linux-2.41.3/misc-utils/kill.c:376:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
util-linux-2.41.3/misc-utils/kill.c:587:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/kill.c:600:16: call_function: calling ‘parse_arguments’ from ‘main’
#  374|   		if (!strncmp(arg, "--list=", 7) || !strncmp(arg, "-l=", 3)) {
#  375|   			char *p = strchr(arg, '=') + 1;
#  376|-> 			if (p[0] == '0' && p[1] == 'x') {
#  377|   				uint64_t sigmask;
#  378|   				if (ul_strtou64(p + 2, &sigmask, 16) < 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def141]
util-linux-2.41.3/misc-utils/look.c:337:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
util-linux-2.41.3/misc-utils/look.c:170:1: enter_function: entry to ‘look’
util-linux-2.41.3/misc-utils/look.c:176:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/look.c:177:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/look.c:186:21: call_function: calling ‘xmalloc’ from ‘look’
util-linux-2.41.3/misc-utils/look.c:186:21: return_function: returning to ‘look’ from ‘xmalloc’
util-linux-2.41.3/misc-utils/look.c:188:17: call_function: calling ‘binary_search’ from ‘look’
#  335|   		if (!dflag || isalnum(*s2) || isblank(*s2))
#  336|   		{
#  337|-> 			*p++ = *s2;
#  338|   			i--;
#  339|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def142]
util-linux-2.41.3/misc-utils/look.c:342:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
util-linux-2.41.3/misc-utils/look.c:170:1: enter_function: entry to ‘look’
util-linux-2.41.3/misc-utils/look.c:176:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/look.c:177:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/look.c:186:21: call_function: calling ‘xmalloc’ from ‘look’
util-linux-2.41.3/misc-utils/look.c:186:21: return_function: returning to ‘look’ from ‘xmalloc’
util-linux-2.41.3/misc-utils/look.c:188:17: call_function: calling ‘binary_search’ from ‘look’
#  340|   		s2++;
#  341|   	}
#  342|-> 	*p = 0;
#  343|   
#  344|   	/* and compare */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def143]
util-linux-2.41.3/misc-utils/lsblk-devtree.c:536:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘a’
util-linux-2.41.3/misc-utils/lsblk-devtree.c:541:5: enter_function: entry to ‘lsblk_devtree_deduplicate_devices’
util-linux-2.41.3/misc-utils/lsblk-devtree.c:547:9: call_function: calling ‘list_sort’ from ‘lsblk_devtree_deduplicate_devices’
#  534|   			    *bx = list_entry(b, struct lsblk_device, ls_devices);
#  535|   
#  536|-> 	return cmp_numbers(makedev(ax->maj, ax->min),
#  537|   			   makedev(bx->maj, bx->min));
#  538|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
util-linux-2.41.3/misc-utils/lsblk-properties.c:257:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.pttype’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#  255|   			unhexmangle_string(prop->partlabel);
#  256|   		else if (lookup(buf, "ID_PART_TABLE_UUID", &prop->ptuuid)) ;
#  257|-> 		else if (lookup(buf, "ID_PART_TABLE_TYPE", &prop->pttype)) ;
#  258|   		else if (lookup(buf, "ID_FS_TYPE", &prop->fstype)) ;
#  259|   		else if (lookup(buf, "ID_FS_VERSION", &prop->fsversion)) ;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
util-linux-2.41.3/misc-utils/lsblk-properties.c:258:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.fstype’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#  256|   		else if (lookup(buf, "ID_PART_TABLE_UUID", &prop->ptuuid)) ;
#  257|   		else if (lookup(buf, "ID_PART_TABLE_TYPE", &prop->pttype)) ;
#  258|-> 		else if (lookup(buf, "ID_FS_TYPE", &prop->fstype)) ;
#  259|   		else if (lookup(buf, "ID_FS_VERSION", &prop->fsversion)) ;
#  260|   		else if (lookup(buf, "ID_PART_ENTRY_TYPE", &prop->parttype)) ;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
util-linux-2.41.3/misc-utils/lsblk-properties.c:259:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.fsversion’
util-linux-2.41.3/misc-utils/lsblk-properties.c:392:23: enter_function: entry to ‘lsblk_device_get_properties’
util-linux-2.41.3/misc-utils/lsblk-properties.c:398:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
util-linux-2.41.3/misc-utils/lsblk-properties.c:401:30: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:411:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: branch_true: ...to here
util-linux-2.41.3/misc-utils/lsblk-properties.c:412:40: call_function: calling ‘get_properties_by_file’ from ‘lsblk_device_get_properties’
#  257|   		else if (lookup(buf, "ID_PART_TABLE_TYPE", &prop->pttype)) ;
#  258|   		else if (lookup(buf, "ID_FS_TYPE", &prop->fstype)) ;
#  259|-> 		else if (lookup(buf, "ID_FS_VERSION", &prop->fsversion)) ;
#  260|   		else if (lookup(buf, "ID_PART_ENTRY_TYPE", &prop->parttype)) ;
#  261|   		else if (lookup(buf, "ID_PART_ENTRY_UUID", &prop->partuuid)) ;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
util-linux-2.41.3/misc-utils/mcookie.c:126:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
util-linux-2.41.3/misc-utils/mcookie.c:139:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/mcookie.c:185:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/mcookie.c:188:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/mcookie.c:189:9: call_function: calling ‘randomness_from_files’ from ‘main’
#  124|   			warn(_("cannot open %s"), fname);
#  125|   		} else {
#  126|-> 			count = hash_file(ctl, fd);
#  127|   			if (ctl->verbose)
#  128|   				fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
util-linux-2.41.3/misc-utils/mcookie.c:137:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
util-linux-2.41.3/misc-utils/mcookie.c:139:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/mcookie.c:185:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/mcookie.c:188:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/mcookie.c:189:9: call_function: calling ‘randomness_from_files’ from ‘main’
#  135|   		}
#  136|   	}
#  137|-> }
#  138|   
#  139|   int main(int argc, char **argv)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
util-linux-2.41.3/misc-utils/mcookie.c:169:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ctl.files’
util-linux-2.41.3/misc-utils/mcookie.c:139:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/mcookie.c:161:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/mcookie.c:162:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/mcookie.c:167:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/mcookie.c:168:45: branch_true: ...to here
util-linux-2.41.3/misc-utils/mcookie.c:168:45: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/misc-utils/mcookie.c:168:45: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/misc-utils/mcookie.c:169:25: danger: ‘ctl.files + ctl.nfiles * 8’ could be NULL: unchecked value from [(10)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/9)
#  167|   			if (!ctl.files)
#  168|   				ctl.files = xmalloc(sizeof(char *) * argc);
#  169|-> 			ctl.files[ctl.nfiles++] = optarg;
#  170|   			break;
#  171|   		case 'm':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def150]
util-linux-2.41.3/misc-utils/namei.c:115:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc((long unsigned int)(sz + 1))’ where non-null expected
util-linux-2.41.3/misc-utils/namei.c:399:1: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/namei.c:448:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:453:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:454:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:456:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:460:15: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:461:34: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:468:22: call_function: calling ‘add_namei’ from ‘main’
#  113|   	if (isrel) {
#  114|   		/* create the absolute path from the relative symlink */
#  115|-> 		memcpy(nm->abslink, path, nm->relstart);
#  116|   		*(nm->abslink + nm->relstart) = '/';
#  117|   		nm->relstart++;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def151]
util-linux-2.41.3/misc-utils/namei.c:123:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc((long unsigned int)(sz + 1))’ where non-null expected
util-linux-2.41.3/misc-utils/namei.c:399:1: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/namei.c:448:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:453:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:454:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:456:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:460:15: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:461:34: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:468:22: call_function: calling ‘add_namei’ from ‘main’
#  121|   		 * - or link without any subdir (foo -> bar)
#  122|   		 */
#  123|-> 		memcpy(nm->abslink, sym, sz);
#  124|   
#  125|   	nm->abslink[sz] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def152]
util-linux-2.41.3/misc-utils/namei.c:142:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 4)’ where non-null expected
util-linux-2.41.3/misc-utils/namei.c:399:1: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/namei.c:448:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:453:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:454:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:456:18: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/namei.c:457:12: branch_false: ...to here
util-linux-2.41.3/misc-utils/namei.c:460:15: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:461:34: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/namei.c:465:20: branch_true: ...to here
util-linux-2.41.3/misc-utils/namei.c:468:22: call_function: calling ‘add_namei’ from ‘main’
#  140|   	path = xmalloc(len + sizeof(DOTDOTDIR));
#  141|   
#  142|-> 	memcpy(path, dirname, len);
#  143|   	memcpy(path + len, DOTDOTDIR, sizeof(DOTDOTDIR));
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
util-linux-2.41.3/misc-utils/rename.c:91:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/misc-utils/rename.c:208:12: enter_function: entry to ‘do_file’
util-linux-2.41.3/misc-utils/rename.c:224:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/rename.c:228:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:228:13: call_function: calling ‘string_replace’ from ‘do_file’
#   89|   	while (count--) {
#   90|   		while (p < where)
#   91|-> 			*q++ = *p++;
#   92|   		p = to;
#   93|   		while (*p)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def154]
util-linux-2.41.3/misc-utils/rename.c:94:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/misc-utils/rename.c:274:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/rename.c:343:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
util-linux-2.41.3/misc-utils/rename.c:348:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:351:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
util-linux-2.41.3/misc-utils/rename.c:354:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:355:12: branch_false: following ‘false’ branch (when ‘interactive == 0’)...
util-linux-2.41.3/misc-utils/rename.c:362:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:362:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
util-linux-2.41.3/misc-utils/rename.c:363:48: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:363:24: call_function: calling ‘do_file’ from ‘main’
#   92|   		p = to;
#   93|   		while (*p)
#   94|-> 			*q++ = *p++;
#   95|   		if (fromlen > 0) {
#   96|   			p = where + fromlen;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def155]
util-linux-2.41.3/misc-utils/rename.c:104:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/misc-utils/rename.c:274:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/rename.c:307:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:307:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/misc-utils/rename.c:307:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/misc-utils/rename.c:340:14: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:343:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
util-linux-2.41.3/misc-utils/rename.c:348:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:351:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
util-linux-2.41.3/misc-utils/rename.c:354:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:355:12: branch_false: following ‘false’ branch (when ‘interactive == 0’)...
util-linux-2.41.3/misc-utils/rename.c:362:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:362:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
util-linux-2.41.3/misc-utils/rename.c:363:48: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:363:24: call_function: calling ‘do_symlink’ from ‘main’
#  102|   	}
#  103|   	while (*p)
#  104|-> 		*q++ = *p++;
#  105|   	*q = 0;
#  106|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def156]
util-linux-2.41.3/misc-utils/rename.c:105:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/misc-utils/rename.c:274:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/rename.c:307:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:307:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/misc-utils/rename.c:307:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/misc-utils/rename.c:340:14: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:343:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
util-linux-2.41.3/misc-utils/rename.c:348:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:351:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
util-linux-2.41.3/misc-utils/rename.c:354:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:355:12: branch_false: following ‘false’ branch (when ‘interactive == 0’)...
util-linux-2.41.3/misc-utils/rename.c:362:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:362:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
util-linux-2.41.3/misc-utils/rename.c:363:48: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:363:24: call_function: calling ‘do_symlink’ from ‘main’
#  103|   	while (*p)
#  104|   		*q++ = *p++;
#  105|-> 	*q = 0;
#  106|   	return 0;
#  107|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def157]
util-linux-2.41.3/misc-utils/rename.c:169:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc((long unsigned int)(sb.st_size + 1))’ where non-null expected
util-linux-2.41.3/misc-utils/rename.c:274:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/rename.c:307:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:307:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/misc-utils/rename.c:307:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/misc-utils/rename.c:306:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
util-linux-2.41.3/misc-utils/rename.c:340:14: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:343:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
util-linux-2.41.3/misc-utils/rename.c:348:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:351:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
util-linux-2.41.3/misc-utils/rename.c:354:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:355:12: branch_false: following ‘false’ branch (when ‘interactive == 0’)...
util-linux-2.41.3/misc-utils/rename.c:362:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/rename.c:362:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
util-linux-2.41.3/misc-utils/rename.c:363:48: branch_true: ...to here
util-linux-2.41.3/misc-utils/rename.c:363:24: call_function: calling ‘do_symlink’ from ‘main’
#  167|   	target = xmalloc(sb.st_size + 1);
#  168|   
#  169|-> 	ssz = readlink(s, target, sb.st_size + 1);
#  170|   	if (ssz < 0) {
#  171|   		warn(_("%s: readlink failed"), s);

Error: GCC_ANALYZER_WARNING (CWE-666): [#def158]
util-linux-2.41.3/misc-utils/uuidd.c:283:21: warning[-Wanalyzer-fd-phase-mismatch]: ‘dup’ on file descriptor ‘s’ in wrong phase
util-linux-2.41.3/misc-utils/uuidd.c:705:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/uuidd.c:719:9: call_function: calling ‘parse_options’ from ‘main’
util-linux-2.41.3/misc-utils/uuidd.c:719:9: return_function: returning to ‘main’ from ‘parse_options’
util-linux-2.41.3/misc-utils/uuidd.c:721:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:724:14: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:767:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:786:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:786:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:807:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:807:9: call_function: calling ‘server_loop’ from ‘main’
#  281|   	 */
#  282|   	while (will_fork && s <= 2) {
#  283|-> 		s = dup(s);
#  284|   		if (s < 0)
#  285|   			err(EXIT_FAILURE, "dup");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
util-linux-2.41.3/misc-utils/uuidd.c:305:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
util-linux-2.41.3/misc-utils/uuidd.c:705:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/uuidd.c:719:9: call_function: calling ‘parse_options’ from ‘main’
util-linux-2.41.3/misc-utils/uuidd.c:719:9: return_function: returning to ‘main’ from ‘parse_options’
util-linux-2.41.3/misc-utils/uuidd.c:721:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:724:14: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:767:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:786:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:786:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/uuidd.c:807:9: branch_false: ...to here
util-linux-2.41.3/misc-utils/uuidd.c:807:9: call_function: calling ‘server_loop’ from ‘main’
#  303|   	uuidd_cxt->cleanup_socket = socket_path;
#  304|   
#  305|-> 	return s;
#  306|   }
#  307|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def160]
util-linux-2.41.3/misc-utils/waitpid.c:54:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_strings, 4) + i * 4’
util-linux-2.41.3/misc-utils/waitpid.c:223:5: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/waitpid.c:234:12: branch_false: following ‘false’ branch (when ‘n_pids != 0’)...
util-linux-2.41.3/misc-utils/waitpid.c:237:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/waitpid.c:241:23: call_function: calling ‘parse_pids’ from ‘main’
#   52|   
#   53|   	for (size_t i = 0; i < n_strings; i++)
#   54|-> 		pids[i] = strtopid_or_err(strings[i], _("failed to parse pid"));
#   55|   
#   56|   	return pids;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def161]
util-linux-2.41.3/misc-utils/wipefs.c:351:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(*len)’ where non-null expected
util-linux-2.41.3/misc-utils/wipefs.c:666:1: enter_function: entry to ‘main’
util-linux-2.41.3/misc-utils/wipefs.c:704:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/misc-utils/wipefs.c:706:17: branch_true: ...to here
util-linux-2.41.3/misc-utils/wipefs.c:706:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/misc-utils/wipefs.c:706:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/misc-utils/wipefs.c:770:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/misc-utils/wipefs.c:776:13: branch_false: ...to here
util-linux-2.41.3/misc-utils/wipefs.c:821:24: branch_true: following ‘true’ branch...
util-linux-2.41.3/misc-utils/wipefs.c:822:44: branch_true: ...to here
util-linux-2.41.3/misc-utils/wipefs.c:823:25: call_function: calling ‘do_wipe’ from ‘main’
#  349|   
#  350|   	wp->magic = xmalloc(*len);
#  351|-> 	memcpy(wp->magic, mag, *len);
#  352|   	wp->len = *len;
#  353|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
util-linux-2.41.3/sys-utils/blkpr.c:166:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 2)’
util-linux-2.41.3/sys-utils/blkpr.c:162:14: acquire_resource: opened here
util-linux-2.41.3/sys-utils/blkpr.c:163:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/blkpr.c:166:9: branch_false: ...to here
util-linux-2.41.3/sys-utils/blkpr.c:166:9: danger: ‘open(path, 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  164|   		err(EXIT_FAILURE, _("cannot open %s"), path);
#  165|   
#  166|-> 	switch (op) {
#  167|   	case IOC_PR_REGISTER:
#  168|   		pr_reg.old_key = oldkey;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def163]
util-linux-2.41.3/sys-utils/hwclock-parse-date.c:1576:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(__time_t *)<unknown>’
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1265:5: enter_function: entry to ‘parse_date’
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1282:12: branch_false: following ‘false’ branch (when ‘now’ is non-NULL)...
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1289:9: branch_false: ...to here
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1293:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1293:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1388:35: branch_true: following ‘true’ branch (when ‘quarter != 4’)...
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1389:48: branch_true: ...to here
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1391:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/hwclock-parse-date.y:1439:13: call_function: calling ‘yyparse’ from ‘parse_date’
# 1574|        unconditionally makes the parser a bit smaller, and it avoids a
# 1575|        GCC warning that YYVAL may be used uninitialized.  */
# 1576|->   yyval = yyvsp[1-yylen];
# 1577|   
# 1578|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def164]
util-linux-2.41.3/sys-utils/irq-common.c:552:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(size)’ where non-null expected
util-linux-2.41.3/sys-utils/irq-common.c:531:24: enter_function: entry to ‘get_scols_table’
util-linux-2.41.3/sys-utils/irq-common.c:546:16: call_function: calling ‘get_irqinfo’ from ‘get_scols_table’
util-linux-2.41.3/sys-utils/irq-common.c:546:16: return_function: returning to ‘get_scols_table’ from ‘get_irqinfo’
util-linux-2.41.3/sys-utils/irq-common.c:547:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/irq-common.c:550:42: branch_false: ...to here
util-linux-2.41.3/sys-utils/irq-common.c:551:18: call_function: calling ‘xmalloc’ from ‘get_scols_table’
util-linux-2.41.3/sys-utils/irq-common.c:551:18: return_function: returning to ‘get_scols_table’ from ‘xmalloc’
util-linux-2.41.3/sys-utils/irq-common.c:552:9: danger: argument 1 (‘xmalloc(size)’) from [(32)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/31) could be NULL where non-null expected
#  550|   	size = sizeof(*stat->irq_info) * stat->nr_irq;
#  551|   	result = xmalloc(size);
#  552|-> 	memcpy(result, stat->irq_info, size);
#  553|   
#  554|   	if (prev) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
util-linux-2.41.3/sys-utils/ldattach.c:393:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 258)’
util-linux-2.41.3/sys-utils/ldattach.c:281:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/ldattach.c:320:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
util-linux-2.41.3/sys-utils/ldattach.c:320:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/ldattach.c:367:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/ldattach.c:372:44: branch_false: ...to here
util-linux-2.41.3/sys-utils/ldattach.c:372:17: call_function: calling ‘lookup_table’ from ‘main’
util-linux-2.41.3/sys-utils/ldattach.c:372:17: return_function: returning to ‘main’ from ‘lookup_table’
util-linux-2.41.3/sys-utils/ldattach.c:373:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/ldattach.c:377:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/ldattach.c:391:23: acquire_resource: opened here
util-linux-2.41.3/sys-utils/ldattach.c:391:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/ldattach.c:393:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/ldattach.c:393:12: danger: ‘open(dev, 258)’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  391|   	if ((tty_fd = open(dev, O_RDWR | O_NOCTTY)) < 0)
#  392|   		err(EXIT_FAILURE, _("cannot open %s"), dev);
#  393|-> 	if (!isatty(tty_fd))
#  394|   		errx(EXIT_FAILURE, _("%s is not a serial line"), dev);
#  395|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
util-linux-2.41.3/sys-utils/lscpu-cpu.c:68:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*cxt.cpus’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:57:5: enter_function: entry to ‘lscpu_create_cpus’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:61:9: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/lscpu-cpu.c:63:27: branch_true: ...to here
util-linux-2.41.3/sys-utils/lscpu-cpu.c:64:21: call_function: calling ‘xcalloc’ from ‘lscpu_create_cpus’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:64:21: return_function: returning to ‘lscpu_create_cpus’ from ‘xcalloc’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:66:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/lscpu-cpu.c:67:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/lscpu-cpu.c:68:42: call_function: calling ‘lscpu_new_cpu’ from ‘lscpu_create_cpus’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:68:42: return_function: returning to ‘lscpu_create_cpus’ from ‘lscpu_new_cpu’
util-linux-2.41.3/sys-utils/lscpu-cpu.c:68:25: danger: ‘*cxt.cpus + i * 8’ could be NULL: unchecked value from [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   66|   	for (n = 0, i = 0; n < (size_t) cxt->maxcpus && i < cxt->npossibles; n++) {
#   67|   		if (CPU_ISSET_S(n, setsize, cpuset))
#   68|-> 			cxt->cpus[i++] = lscpu_new_cpu(n);
#   69|   	}
#   70|   

Error: CPPCHECK_WARNING (CWE-457): [#def167]
util-linux-2.41.3/sys-utils/mount.c:880: warning[uninitvar]: Uninitialized variable: path
#  878|   				snprintf(path, sizeof(path), "/proc/%i/ns/mnt", pid);
#  879|   
#  880|-> 			if (mnt_context_set_target_ns(cxt, pid ? path : optarg))
#  881|   				err(MNT_EX_SYSERR, _("failed to set target namespace to %s"), pid ? path : optarg);
#  882|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
util-linux-2.41.3/sys-utils/nsenter.c:177:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*((struct namespace_file (*)[9])n)[preserve_cred].fd’
util-linux-2.41.3/sys-utils/nsenter.c:493:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/nsenter.c:556:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/sys-utils/nsenter.c:560:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/nsenter.c:560:17: call_function: calling ‘err_exclusive_options’ from ‘main’
util-linux-2.41.3/sys-utils/nsenter.c:560:17: return_function: returning to ‘main’ from ‘err_exclusive_options’
util-linux-2.41.3/sys-utils/nsenter.c:590:25: call_function: calling ‘enable_namespace’ from ‘main’
#  175|   	if (*fd < 0)
#  176|   		err(EXIT_FAILURE, _("cannot open %s"), path);
#  177|-> }
#  178|   
#  179|   static void enable_nsfile(struct namespace_file *n, const char *path)

Error: CPPCHECK_WARNING (CWE-682): [#def169]
util-linux-2.41.3/sys-utils/nsenter.c:395: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  393|   	if (!path)
#  394|   		err(EXIT_FAILURE, _("failed to get cgroup path"));
#  395|-> 	path++;
#  396|   
#  397|   	snprintf(fdpath, sizeof(fdpath), _PATH_SYS_CGROUP "/%s/cgroup.procs", path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
util-linux-2.41.3/sys-utils/readprofile.c:229:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&defaultpro, 1)’
util-linux-2.41.3/sys-utils/readprofile.c:168:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.41.3/sys-utils/readprofile.c:169:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:211:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:217:20: branch_true: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:217:20: branch_false: following ‘false’ branch (when ‘has_mult == 0’)...
util-linux-2.41.3/sys-utils/readprofile.c:220:25: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:226:22: acquire_resource: opened here
util-linux-2.41.3/sys-utils/readprofile.c:227:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:229:21: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:229:21: danger: ‘open(&defaultpro, 1)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  227|   		if (fd < 0)
#  228|   			err(EXIT_FAILURE, "%s", defaultpro);
#  229|-> 		if (write(fd, &multiplier, to_write) != to_write)
#  230|   			err(EXIT_FAILURE, _("error writing %s"), defaultpro);
#  231|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
util-linux-2.41.3/sys-utils/readprofile.c:276:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(len)’
util-linux-2.41.3/sys-utils/readprofile.c:120:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/readprofile.c:211:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:236:23: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:237:29: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:238:17: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:236:13: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:240:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:240:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
util-linux-2.41.3/sys-utils/readprofile.c:243:15: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:243:15: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.41.3/sys-utils/readprofile.c:243:15: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.41.3/sys-utils/readprofile.c:246:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/readprofile.c:248:9: branch_false: ...to here
util-linux-2.41.3/sys-utils/readprofile.c:276:9: danger: ‘xmalloc(len)’ could be NULL: unchecked value from [(14)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/13)
#  274|   	}
#  275|   
#  276|-> 	step = buf[0];
#  277|   	if (optInfo) {
#  278|   		printf(_("Sampling_step: %u\n"), step);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
util-linux-2.41.3/sys-utils/setpgid.c:76:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
util-linux-2.41.3/sys-utils/setpgid.c:65:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:70:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:70:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_true: following ‘true’ branch (when ‘foreground != 0’)...
util-linux-2.41.3/sys-utils/setpgid.c:74:22: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:74:22: acquire_resource: opened here
util-linux-2.41.3/sys-utils/setpgid.c:75:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:76:29: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:76:28: danger: ‘open("/dev/tty", 524288)’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   74|   		fd = open("/dev/tty", O_RDONLY|O_CLOEXEC);
#   75|   		if (fd >= 0) {
#   76|-> 			if (sigemptyset(&s) < 0)
#   77|   				err(EXIT_FAILURE, _("sigemptyset failed"));
#   78|   			if (sigaddset(&s, SIGTTOU) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
util-linux-2.41.3/sys-utils/setpgid.c:78:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
util-linux-2.41.3/sys-utils/setpgid.c:65:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:70:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:70:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_true: following ‘true’ branch (when ‘foreground != 0’)...
util-linux-2.41.3/sys-utils/setpgid.c:74:22: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:74:22: acquire_resource: opened here
util-linux-2.41.3/sys-utils/setpgid.c:75:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:76:29: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:76:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:78:29: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:78:28: danger: ‘open("/dev/tty", 524288)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   76|   			if (sigemptyset(&s) < 0)
#   77|   				err(EXIT_FAILURE, _("sigemptyset failed"));
#   78|-> 			if (sigaddset(&s, SIGTTOU) < 0)
#   79|   				err(EXIT_FAILURE, _("sigaddset failed"));
#   80|   			if (sigprocmask(SIG_BLOCK, &s, &old) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
util-linux-2.41.3/sys-utils/setpgid.c:80:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
util-linux-2.41.3/sys-utils/setpgid.c:65:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:70:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:70:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:73:12: branch_true: following ‘true’ branch (when ‘foreground != 0’)...
util-linux-2.41.3/sys-utils/setpgid.c:74:22: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:74:22: acquire_resource: opened here
util-linux-2.41.3/sys-utils/setpgid.c:75:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:76:29: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:76:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:78:29: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:78:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpgid.c:80:29: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpgid.c:80:28: danger: ‘open("/dev/tty", 524288)’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#   78|   			if (sigaddset(&s, SIGTTOU) < 0)
#   79|   				err(EXIT_FAILURE, _("sigaddset failed"));
#   80|-> 			if (sigprocmask(SIG_BLOCK, &s, &old) < 0)
#   81|   				err(EXIT_FAILURE, _("sigprocmask failed"));
#   82|   			if (tcsetpgrp(fd, getpgid(0)) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
util-linux-2.41.3/sys-utils/setpriv.c:654:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/attr/exec", 2)’
util-linux-2.41.3/sys-utils/setpriv.c:802:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/setpriv.c:1044:12: branch_false: following ‘false’ branch (when ‘dumplevel == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: following ‘false’ branch (when ‘list_caps == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1060:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1060:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1063:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1079:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1089:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1089:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1092:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1092:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1093:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1093:17: call_function: calling ‘do_selinux_label’ from ‘main’
#  652|   	len = strlen(label);
#  653|   	errno = 0;
#  654|-> 	if (write(fd, label, len) != (ssize_t) len)
#  655|   		err(SETPRIV_EXIT_PRIVERR,
#  656|   		    _("write failed: %s"), _PATH_PROC_ATTR_EXEC);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
util-linux-2.41.3/sys-utils/setpriv.c:695:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
util-linux-2.41.3/sys-utils/setpriv.c:802:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/setpriv.c:1044:12: branch_false: following ‘false’ branch (when ‘dumplevel == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1052:12: branch_false: following ‘false’ branch (when ‘list_caps == 0’)...
util-linux-2.41.3/sys-utils/setpriv.c:1060:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1060:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1063:14: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1079:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1089:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1089:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1092:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1092:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1094:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1094:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1096:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1096:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/setpriv.c:1097:17: branch_true: ...to here
util-linux-2.41.3/sys-utils/setpriv.c:1097:17: call_function: calling ‘do_seccomp_filter’ from ‘main’
#  693|   
#  694|   	s = read_all_alloc(fd, &filter);
#  695|-> 	if (s < 0)
#  696|   		err(SETPRIV_EXIT_PRIVERR,
#  697|   		    _("cannot read %s"), file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
util-linux-2.41.3/sys-utils/swapoff.c:82:35: warning[-Wanalyzer-malloc-leak]: leak of ‘swapoff_resolve_tag(name,  value,  mntcache)’
util-linux-2.41.3/sys-utils/swapoff.c:228:5: enter_function: entry to ‘main’
util-linux-2.41.3/sys-utils/swapoff.c:283:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/sys-utils/swapoff.c:284:27: branch_true: ...to here
util-linux-2.41.3/sys-utils/swapoff.c:284:27: call_function: calling ‘swapoff_by’ from ‘main’
#   80|   	while (tb && mnt_table_next_fs(tb, itr, &fs) == 0) {
#   81|   		blkid_probe pr = NULL;
#   82|-> 		const char *src = mnt_fs_get_source(fs);
#   83|   		const char *type = mnt_fs_get_swaptype(fs);
#   84|   		const char *data = NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def178]
util-linux-2.41.3/sys-utils/umount.c:599: warning[uninitvar]: Uninitialized variable: path
#  597|   				snprintf(path, sizeof(path), "/proc/%i/ns/mnt", pid);
#  598|   
#  599|-> 			if (mnt_context_set_target_ns(cxt, pid ? path : optarg))
#  600|   				err(MNT_EX_SYSERR, _("failed to set target namespace to %s"), pid ? path : optarg);
#  601|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
util-linux-2.41.3/sys-utils/unshare.c:118:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/setgroups", 1)’
util-linux-2.41.3/sys-utils/unshare.c:111:14: acquire_resource: opened here
util-linux-2.41.3/sys-utils/unshare.c:112:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/sys-utils/unshare.c:118:13: branch_false: ...to here
util-linux-2.41.3/sys-utils/unshare.c:118:12: danger: ‘open("/proc/self/setgroups", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  116|   	}
#  117|   
#  118|-> 	if (write_all(fd, cmd, strlen(cmd)))
#  119|   		err(EXIT_FAILURE, _("write failed %s"), file);
#  120|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def180]
util-linux-2.41.3/term-utils/agetty.c:1858:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.41.3/term-utils/agetty.c:1847:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1848:22: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1851:30: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/agetty.c:1854:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/agetty.c:1858:25: branch_false: ...to here
util-linux-2.41.3/term-utils/agetty.c:1858:25: danger: argument 2 (‘*ie.output’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 1856|   			output_special_char(ie, fgetc(f), op, tp, f);
# 1857|   		else
# 1858|-> 			putc(c, ie->output);
# 1859|   	}
# 1860|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def181]
util-linux-2.41.3/term-utils/agetty.c:2715:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.41.3/term-utils/agetty.c:1837:12: enter_function: entry to ‘issuefile_read_stream’
util-linux-2.41.3/term-utils/agetty.c:1847:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1848:22: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1851:30: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/agetty.c:1854:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1856:49: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1856:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’
#argument 2 of ‘__builtin_fputc’ must be non-null
# 2713|   			}
# 2714|   		} else
# 2715|-> 			fputs("\033", ie->output);
# 2716|   		break;
# 2717|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def182]
util-linux-2.41.3/term-utils/agetty.c:2790:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.41.3/term-utils/agetty.c:1837:12: enter_function: entry to ‘issuefile_read_stream’
util-linux-2.41.3/term-utils/agetty.c:1847:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1848:22: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1851:30: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/agetty.c:1854:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1856:49: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1856:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’
#argument 2 of ‘__builtin_fputs’ must be non-null
# 2788|   	}
# 2789|   	case 'l':
# 2790|-> 		fprintf (ie->output, "%s", op->tty);
# 2791|   		break;
# 2792|   	case 'b':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def183]
util-linux-2.41.3/term-utils/agetty.c:2885:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.41.3/term-utils/agetty.c:1837:12: enter_function: entry to ‘issuefile_read_stream’
util-linux-2.41.3/term-utils/agetty.c:1847:12: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1848:22: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1851:30: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/agetty.c:1854:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1855:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/agetty.c:1856:49: branch_true: ...to here
util-linux-2.41.3/term-utils/agetty.c:1856:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’
# 2883|   #endif
# 2884|   	default:
# 2885|-> 		putc(c, ie->output);
# 2886|   		break;
# 2887|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
util-linux-2.41.3/term-utils/setterm.c:741:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_snapshot_device(ctl)’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:741:13: danger: ‘open_snapshot_device(ctl)’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  739|   	int fd;
#  740|   
#  741|-> 	if (ctl->opt_sn_num)
#  742|   		xasprintf(&ctl->in_device, "/dev/vcsa%d", ctl->opt_sn_num);
#  743|   	else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
util-linux-2.41.3/term-utils/setterm.c:802:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ctl.opt_sn_name,  <unknown>)’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:798:15: acquire_resource: opened here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: danger: ‘fopen(*ctl.opt_sn_name,  <unknown>)’ leaks here; was opened at [(14)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/13)
#  800|   		err(EXIT_DUMPFILE, _("cannot open dump file %s for output"), ctl->opt_sn_name);
#  801|   	/* determine snapshot size */
#  802|-> 	if (read(fd, header, 4) != 4)
#  803|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  804|   	rows = header[0];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
util-linux-2.41.3/term-utils/setterm.c:802:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ctl.opt_sn_name,  <unknown>)’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:798:15: acquire_memory: allocated here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: danger: ‘fopen(*ctl.opt_sn_name,  <unknown>)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/13)
#  800|   		err(EXIT_DUMPFILE, _("cannot open dump file %s for output"), ctl->opt_sn_name);
#  801|   	/* determine snapshot size */
#  802|-> 	if (read(fd, header, 4) != 4)
#  803|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  804|   	rows = header[0];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
util-linux-2.41.3/term-utils/setterm.c:804:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ctl.opt_sn_name,  <unknown>)’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:798:15: acquire_resource: opened here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:804:16: danger: ‘fopen(*ctl.opt_sn_name,  <unknown>)’ leaks here; was opened at [(14)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/13)
#  802|   	if (read(fd, header, 4) != 4)
#  803|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  804|-> 	rows = header[0];
#  805|   	cols = header[1];
#  806|   	if (rows * cols == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
util-linux-2.41.3/term-utils/setterm.c:804:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ctl.opt_sn_name,  <unknown>)’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:798:15: acquire_memory: allocated here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:804:16: danger: ‘fopen(*ctl.opt_sn_name,  <unknown>)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/13)
#  802|   	if (read(fd, header, 4) != 4)
#  803|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  804|-> 	rows = header[0];
#  805|   	cols = header[1];
#  806|   	if (rows * cols == 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def189]
util-linux-2.41.3/term-utils/setterm.c:820:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:809:25: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:809:17: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:809:17: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:810:18: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:810:18: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:813:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: ...to here
util-linux-2.41.3/term-utils/setterm.c:819:29: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/setterm.c:820:26: branch_true: ...to here
util-linux-2.41.3/term-utils/setterm.c:820:25: danger: ‘q’ could be NULL: unchecked value from [(27)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/26)
#  818|   	for (i = 0; i < rows; i++) {
#  819|   		for (j = 0; j < cols; j++) {
#  820|-> 			*q++ = *p;
#  821|   			p += 2;
#  822|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def190]
util-linux-2.41.3/term-utils/setterm.c:820:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:809:25: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:809:17: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:809:17: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:810:18: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:810:18: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:813:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: ...to here
util-linux-2.41.3/term-utils/setterm.c:819:29: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/setterm.c:820:26: branch_true: ...to here
util-linux-2.41.3/term-utils/setterm.c:820:32: danger: ‘p’ could be NULL: unchecked value from [(22)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/21)
#  818|   	for (i = 0; i < rows; i++) {
#  819|   		for (j = 0; j < cols; j++) {
#  820|-> 			*q++ = *p;
#  821|   			p += 2;
#  822|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def191]
util-linux-2.41.3/term-utils/setterm.c:825:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.41.3/term-utils/setterm.c:784:13: enter_function: entry to ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: call_function: calling ‘open_snapshot_device’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:795:14: return_function: returning to ‘screendump’ from ‘open_snapshot_device’
util-linux-2.41.3/term-utils/setterm.c:796:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:798:39: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:799:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:802:13: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:802:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:804:16: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:806:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:809:25: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:809:17: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:809:17: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:810:18: call_function: calling ‘xmalloc’ from ‘screendump’
util-linux-2.41.3/term-utils/setterm.c:810:18: return_function: returning to ‘screendump’ from ‘xmalloc’
util-linux-2.41.3/term-utils/setterm.c:813:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: following ‘true’ branch...
util-linux-2.41.3/term-utils/setterm.c:818:21: branch_true: ...to here
util-linux-2.41.3/term-utils/setterm.c:819:29: branch_false: following ‘false’ branch...
util-linux-2.41.3/term-utils/setterm.c:819:29: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:823:24: branch_false: following ‘false’ branch (when ‘j == 0’)...
util-linux-2.41.3/term-utils/setterm.c:825:18: branch_false: ...to here
util-linux-2.41.3/term-utils/setterm.c:825:17: danger: ‘q’ could be NULL: unchecked value from [(27)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/26)
#  823|   		while (j-- > 0 && q[-1] == ' ')
#  824|   			q--;
#  825|-> 		*q++ = '\n';
#  826|   	}
#  827|   	fwrite(outbuf, 1, q - outbuf, out);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def192]
util-linux-2.41.3/term-utils/wall.c:382:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fs’ where non-null expected
util-linux-2.41.3/term-utils/wall.c:345:14: enter_function: entry to ‘makemsg’
util-linux-2.41.3/term-utils/wall.c:349:21: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/wall.c:351:16: call_function: calling ‘xmalloc’ from ‘makemsg’
util-linux-2.41.3/term-utils/wall.c:351:16: return_function: returning to ‘makemsg’ from ‘xmalloc’
util-linux-2.41.3/term-utils/wall.c:353:12: branch_true: following ‘true’ branch (when ‘print_banner == 1’)...
util-linux-2.41.3/term-utils/wall.c:354:34: branch_true: ...to here
util-linux-2.41.3/term-utils/wall.c:354:34: call_function: calling ‘xgethostname’ from ‘makemsg’
util-linux-2.41.3/term-utils/wall.c:354:34: return_function: returning to ‘makemsg’ from ‘xgethostname’
util-linux-2.41.3/term-utils/wall.c:382:17: danger: argument 1 (‘fs’) from [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1) could be NULL where non-null expected
#  380|   		/* snprintf is not always available, but the sprintf's here
#  381|   		   will not overflow as long as %d takes at most 100 chars */
#  382|-> 		fprintf(fs, "\r%*s\r\n", TERM_WIDTH, " ");
#  383|   
#  384|   		snprintf(lbuf, lbuflen,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def193]
util-linux-2.41.3/term-utils/wall.c:391:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fs’ where non-null expected
util-linux-2.41.3/term-utils/wall.c:345:14: enter_function: entry to ‘makemsg’
util-linux-2.41.3/term-utils/wall.c:349:21: acquire_memory: this call could return NULL
util-linux-2.41.3/term-utils/wall.c:351:16: call_function: calling ‘xmalloc’ from ‘makemsg’
util-linux-2.41.3/term-utils/wall.c:351:16: return_function: returning to ‘makemsg’ from ‘xmalloc’
util-linux-2.41.3/term-utils/wall.c:353:12: branch_false: following ‘false’ branch (when ‘print_banner != 1’)...
util-linux-2.41.3/term-utils/wall.c:391:9: branch_false: ...to here
util-linux-2.41.3/term-utils/wall.c:391:9: danger: argument 1 (‘fs’) from [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1) could be NULL where non-null expected
#  389|   		free(whombuf);
#  390|   	}
#  391|-> 	fprintf(fs, "%*s\r\n", TERM_WIDTH, " ");
#  392|   
#  393|   	 if (mvec) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def194]
util-linux-2.41.3/text-utils/bits.c:321:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argv’
util-linux-2.41.3/text-utils/bits.c:245:16: release_memory: ‘stdin_lines’ is NULL
util-linux-2.41.3/text-utils/bits.c:298:12: branch_true: following ‘true’ branch (when ‘argc == 0’)...
util-linux-2.41.3/text-utils/bits.c:298:12: branch_true: ...to here
util-linux-2.41.3/text-utils/bits.c:302:24: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/bits.c:309:24: branch_false: ...to here
util-linux-2.41.3/text-utils/bits.c:309:24: release_memory: ‘stdin_lines’ is NULL
util-linux-2.41.3/text-utils/bits.c:310:17: release_memory: ‘stdin_lines’ is NULL
util-linux-2.41.3/text-utils/bits.c:314:12: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/bits.c:318:9: branch_false: ...to here
util-linux-2.41.3/text-utils/bits.c:320:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
util-linux-2.41.3/text-utils/bits.c:321:17: branch_true: ...to here
util-linux-2.41.3/text-utils/bits.c:321:17: danger: dereference of NULL ‘argv’
#  319|   
#  320|   	for (; argc > 0; argc--, argv++)
#  321|-> 		parse_mask_or_list(*argv, bits, width);
#  322|   
#  323|   	ul_strv_free(stdin_lines);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
util-linux-2.41.3/text-utils/hexdump-parse.c:606:1: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
util-linux-2.41.3/text-utils/hexdump-parse.c:478:26: enter_function: entry to ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: call_function: calling ‘xmalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:484:20: return_function: returning to ‘color_fmt’ from ‘xmalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: call_function: calling ‘xcalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:485:23: return_function: returning to ‘color_fmt’ from ‘xcalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:492:16: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:495:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: call_function: calling ‘xstrndup’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:500:23: return_function: returning to ‘color_fmt’ from ‘xstrndup’
util-linux-2.41.3/text-utils/hexdump-parse.c:505:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:509:21: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:555:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:558:28: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:562:29: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:562:28: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:563:33: branch_true: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:568:36: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:571:36: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:571:36: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:571:36: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:575:40: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:593:21: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:593:20: branch_false: following ‘false’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:597:21: branch_false: ...to here
util-linux-2.41.3/text-utils/hexdump-parse.c:597:20: branch_true: following ‘true’ branch...
util-linux-2.41.3/text-utils/hexdump-parse.c:600:34: call_function: calling ‘xcalloc’ from ‘color_fmt’
util-linux-2.41.3/text-utils/hexdump-parse.c:600:34: return_function: returning to ‘color_fmt’ from ‘xcalloc’
util-linux-2.41.3/text-utils/hexdump-parse.c:606:1: danger: ‘hcnext’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  604|   	}
#  605|   	return ret_head;
#  606|-> }
#  607|   
#  608|   static void escape(char *p1)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def196]
util-linux-2.41.3/text-utils/more.c:289:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘as_argv’
util-linux-2.41.3/text-utils/more.c:2105:5: enter_function: entry to ‘main’
util-linux-2.41.3/text-utils/more.c:2132:12: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
util-linux-2.41.3/text-utils/more.c:2133:17: branch_true: ...to here
util-linux-2.41.3/text-utils/more.c:2133:17: call_function: calling ‘env_argscan’ from ‘main’
#  287|   		int move = 0;
#  288|   
#  289|-> 		if (as_argv[opt][0] == '-' && isdigit_string(as_argv[opt] + 1)) {
#  290|   			ctl->lines_per_screen =
#  291|   			    strtos16_or_err(as_argv[opt], _("failed to parse number"));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def197]
util-linux-2.41.3/text-utils/more.c:312:21: warning[-Wanalyzer-null-argument]: use of NULL ‘as_argv’ where non-null expected
util-linux-2.41.3/text-utils/more.c:2105:5: enter_function: entry to ‘main’
util-linux-2.41.3/text-utils/more.c:2132:12: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
util-linux-2.41.3/text-utils/more.c:2133:17: branch_true: ...to here
util-linux-2.41.3/text-utils/more.c:2133:17: call_function: calling ‘env_argscan’ from ‘main’
#  310|   	}
#  311|   
#  312|-> 	while ((c = getopt_long(as_argc, as_argv, "dflcpsun:eVh", longopts, NULL)) != -1) {
#  313|   		switch (c) {
#  314|   		case 'd':

Error: CPPCHECK_WARNING (CWE-476): [#def198]
util-linux-2.41.3/text-utils/ul.c:640: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  638|   				err(EXIT_FAILURE, _("cannot open %s"), argv[optind]);
#  639|   			filter(&ctl, &tcs, f);
#  640|-> 			fclose(f);
#  641|   		}
#  642|   	}

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-50.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameutil-linux-2.41.3-12.fc44
store-results-to/tmp/tmphk1stutv/util-linux-2.41.3-12.fc44.tar.xz
time-created2026-08-03 21:27:54
time-finished2026-08-03 21:35:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmphk1stutv/util-linux-2.41.3-12.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphk1stutv/util-linux-2.41.3-12.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9