Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/disk-utils/cfdisk.c: scope_hint: In function ‘menu_update_ignore’
util-linux-2.43.devel/disk-utils/cfdisk.c:875:28: warning[-Wanalyzer-malloc-leak]: leak of ‘*m.ignore’
util-linux-2.43.devel/disk-utils/cfdisk.c:65: included_from: Included from here.
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/disk-utils/cfdisk.c:55: included_from: Included from here.
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:2170:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:61: included_from: Included from here.
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:903:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:1182:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:857:9: note: in expansion of macro ‘DBG’
#  873|   	m->nitems = 0;
#  874|   
#  875|-> 	for (d = m->items; d->name; d++) {
#  876|   		if (m->ignore && strchr(m->ignore, d->key))
#  877|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/disk-utils/cfdisk.c: scope_hint: In function ‘menu_set_title’
util-linux-2.43.devel/disk-utils/cfdisk.c:952:1: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:2170:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:903:9: note: in expansion of macro ‘DBG’
#  950|   	free(m->title);
#  951|   	m->title = str;
#  952|-> }
#  953|   
#  954|   

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/disk-utils/cfdisk.c: scope_hint: In function ‘ui_create_label’
util-linux-2.43.devel/disk-utils/cfdisk.c:2182:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(fdisk_get_nlabels(*cf.cxt) + 1, 32) + i * 32’
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/include/debug.h:106:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.43.devel/disk-utils/cfdisk.c:271:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.43.devel/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/disk-utils/cfdisk.c:2170:9: note: in expansion of macro ‘DBG’
# 2180|   		    fdisk_label_get_type(lb) == FDISK_DISKLABEL_BSD)
# 2181|   			continue;
# 2182|-> 		cm[i++].name = fdisk_label_get_name(lb);
# 2183|   	}
# 2184|   

Error: CPPCHECK_WARNING (CWE-457):
util-linux-2.43.devel/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):
util-linux-2.43.devel/disk-utils/fdformat.c: scope_hint: In function ‘verify_disk’
util-linux-2.43.devel/disk-utils/fdformat.c:129:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(track_size)’
util-linux-2.43.devel/disk-utils/fdformat.c:28: included_from: Included from here.
#  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):
util-linux-2.43.devel/disk-utils/fdisk-menu.c: scope_hint: In function ‘next_menu_entry’
util-linux-2.43.devel/disk-utils/fdisk-menu.c:296:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((unsigned char*)&*m)[8]’
util-linux-2.43.devel/include/pt-mbr.h:8: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fdisk-menu.c:21: included_from: Included from here.
#  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):
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c: scope_hint: In function ‘parse_directory’
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:302:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 257)’ where non-null expected
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:37: included_from: Included from here.
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  300|   	/* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */
#  301|   	path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1);
#  302|-> 	memcpy(path, name, len);
#  303|   	endpath = path + len;
#  304|   	*endpath = '/';

Error: CPPCHECK_WARNING (CWE-190):
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:377: error[integerOverflow]: Signed integer overflow for expression '-(1<<24)'.
#  375|   		} else {
#  376|   			entry->size = st.st_rdev;
#  377|-> 			if (entry->size & -(1<<CRAMFS_SIZE_WIDTH))
#  378|   				warn_dev = 1;
#  379|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c: scope_hint: In function ‘main’
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:856:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:49: included_from: Included from here.
#  854|   			 -1, 0);
#  855|   
#  856|-> 	if (-1 == (int) (long) rom_image)
#  857|   		err(MKFS_EX_ERROR, _("ROM image map"));
#  858|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c:570:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘inode_map’ where non-null expected
util-linux-2.43.devel/disk-utils/mkfs.minix.c:87: included_from: Included from here.
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c:76: included_from: Included from here.
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c:65: included_from: Included from here.
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#  568|   	inode_map = xmalloc(imaps * MINIX_BLOCK_SIZE);
#  569|   	zone_map = xmalloc(zmaps * MINIX_BLOCK_SIZE);
#  570|-> 	memset(inode_map,0xff,imaps * MINIX_BLOCK_SIZE);
#  571|   	memset(zone_map,0xff,zmaps * MINIX_BLOCK_SIZE);
#  572|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/disk-utils/mkfs.minix.c:571:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘zone_map’ where non-null expected
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#  569|   	zone_map = xmalloc(zmaps * MINIX_BLOCK_SIZE);
#  570|   	memset(inode_map,0xff,imaps * MINIX_BLOCK_SIZE);
#  571|-> 	memset(zone_map,0xff,zmaps * MINIX_BLOCK_SIZE);
#  572|   
#  573|   	for (i = get_first_zone() ; i<zones ; i++)

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/disk-utils/mkfs.minix.c:579:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘inode_buffer’ where non-null expected
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/minix_programs.h:30:25: note: in definition of macro ‘UPPER’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
util-linux-2.43.devel/disk-utils/mkfs.minix.c: scope_hint: In function ‘setup_tables’
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#  577|   
#  578|   	inode_buffer = xmalloc(get_inode_buffer_size());
#  579|-> 	memset(inode_buffer,0, get_inode_buffer_size());
#  580|   
#  581|   	printf(P_("%lu inode\n", "%lu inodes\n", inodes), inodes);

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/disk-utils/fdisk.c:36: included_from: Included from here.
util-linux-2.43.devel/include/all-io.h: scope_hint: In function ‘read_all’
util-linux-2.43.devel/include/all-io.h:67:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected
util-linux-2.43.devel/disk-utils/fdisk.h:18: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fdisk.c:47: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fdisk.c:35: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fdisk.c:17: included_from: Included from here.
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#   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):
util-linux-2.43.devel/sys-utils/setpriv.c:35: included_from: Included from here.
util-linux-2.43.devel/include/all-io.h: scope_hint: In function ‘do_seccomp_filter’
util-linux-2.43.devel/include/all-io.h:97:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
util-linux-2.43.devel/sys-utils/setpriv.c:21: included_from: Included from here.
#   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):
util-linux-2.43.devel/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):
util-linux-2.43.devel/include/list.h:53:19: warning[-Wanalyzer-use-after-free]: use after 'free' of 'child'
util-linux-2.43.devel/libsmartcols/src/line.c: scope_hint: In function 'scols_line_add_child'
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:19: included_from: Included from here.
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/line.c:247:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/line.c:223:9: note: in expansion of macro 'DBG'
#   51|   {
#   52|   	next->prev = add;
#   53|-> 	add->next = next;
#   54|   	add->prev = prev;
#   55|   	prev->next = add;

Error: GCC_ANALYZER_WARNING (CWE-416):
util-linux-2.43.devel/include/list.h:107:9: warning[-Wanalyzer-use-after-free]: use after 'free' of 'v'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/blkidP.h:34: included_from: Included from here.
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2135:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:150:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2438:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c:662:9: note: in expansion of macro 'list_for_each_safe'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:30: included_from: Included from here.
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:903:41: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:281:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:903:41: note: in expansion of macro 'list_entry'
#  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):
util-linux-2.43.devel/include/list.h:126:20: warning[-Wanalyzer-infinite-loop]: infinite loop
util-linux-2.43.devel/misc-utils/lsblk-devtree.c: scope_hint: In function ‘device_remove_dependences’
util-linux-2.43.devel/misc-utils/lsblk-devtree.c: scope_hint: In function ‘device_remove_dependences’
#  124|   _INLINE_ int list_empty(struct list_head *head)
#  125|   {
#  126|-> 	return head->next == head;
#  127|   }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/disk-utils/partx.c:37: included_from: Included from here.
util-linux-2.43.devel/include/strutils.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/strutils.h:277:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xstrdup(*<unknown>)’
util-linux-2.43.devel/disk-utils/partx.c:38: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/disk-utils/partx.c:33: included_from: Included from here.
#  275|   	size_t sz = prefix ? strlen(prefix) : 0;
#  276|   
#  277|->         if (s && sz && strncmp(s, prefix, sz) == 0)
#  278|                   return s + sz;
#  279|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/uuidgen.c:22: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘unhex’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((*valuelen >> 1) + 1)’
#   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):
util-linux-2.43.devel/term-utils/setterm.c:82: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘screendump’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)((cols + 1) * rows))’
#   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):
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)(rows * cols * 2))’
#   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):
util-linux-2.43.devel/disk-utils/mkswap.c:50: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘check_blocks’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)*ctl.pagesize)’
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
util-linux-2.43.devel/disk-utils/mkswap.c:54: included_from: Included from here.
#   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):
util-linux-2.43.devel/misc-utils/lsclocks.c:38: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(24)’
#   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):
util-linux-2.43.devel/lsfd-cmd/lsfd.h:41: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/unkn.c:30: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘add_inode’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(32)’
#   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):
util-linux-2.43.devel/disk-utils/fsck.cramfs.c:69: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘test_crc’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(4096)’
util-linux-2.43.devel/disk-utils/fsck.cramfs.c:57: included_from: Included from here.
#   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):
util-linux-2.43.devel/disk-utils/mkfs.cramfs.c:60: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘parse_directory’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(len + 257)’
#   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):
util-linux-2.43.devel/sys-utils/readprofile.c:50: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(len)’
#   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):
util-linux-2.43.devel/text-utils/hexdump-parse.c:46: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘color_fmt’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xstrndup(a, (long unsigned int)(p2 - a))’
util-linux-2.43.devel/text-utils/hexdump.h:39: included_from: Included from here.
util-linux-2.43.devel/text-utils/hexdump-parse.c:44: included_from: Included from here.
util-linux-2.43.devel/text-utils/hexdump-parse.c:238:9: note: in expansion of macro ‘list_for_each’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/sys/types.h:25: included_from: Included from here.
util-linux-2.43.devel/text-utils/hexdump-parse.c:38: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/text-utils/hexdump.h:38: included_from: Included from here.
#   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):
util-linux-2.43.devel/sys-utils/irq-common.c:32: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘xreallocarray’
util-linux-2.43.devel/include/xalloc.h:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.43.devel/sys-utils/irq-common.c: scope_hint: In function ‘xreallocarray’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/ctype.h:25: included_from: Included from here.
util-linux-2.43.devel/sys-utils/irq-common.c:14: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/sys-utils/irq-common.c:27: included_from: Included from here.
util-linux-2.43.devel/sys-utils/irq-common.c:31: included_from: Included from here.
#   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):
util-linux-2.43.devel/text-utils/ul.c:62: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘xreallocarray’
util-linux-2.43.devel/include/xalloc.h:54:21: warning[-Wanalyzer-mismatching-deallocation]: ‘ptr’ should have been deallocated with ‘free’ but was deallocated with ‘reallocarray’
#   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):
util-linux-2.43.devel/lsfd-cmd/lsfd.h:41: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/cdev.c:22: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘read_misc’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_miscdev(minor, & name)’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/debug.h:40: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.h:35: included_from: Included from here.
#   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):
util-linux-2.43.devel/lsfd-cmd/lsfd.h:41: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.c:60: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘add_nodev’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_nodev(minor,  filesystem)’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.c:48: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘add_nodev’
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘add_nodev’
util-linux-2.43.devel/lsfd-cmd/lsfd.h:230:25: note: in expansion of macro ‘is_opened_file’
util-linux-2.43.devel/lsfd-cmd/lsfd.c:1109:26: note: in expansion of macro ‘has_mnt_id’
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘add_nodev’
#   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):
util-linux-2.43.devel/lsfd-cmd/lsfd.h:41: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/bdev.c:22: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘read_partitions’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_partition(__dev, & name)’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/debug.h:40: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.h:35: included_from: Included from here.
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_zram(*<unknown>)’
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
util-linux-2.43.devel/sys-utils/zramctl.c:42: included_from: Included from here.
/usr/include/systemd/_sd-common.h:20: included_from: Included from here.
/usr/include/systemd/sd-device.h:23: included_from: Included from here.
util-linux-2.43.devel/sys-utils/zramctl.c:32: included_from: Included from here.
#   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):
util-linux-2.43.devel/login-utils/lslogins.c:57: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 120)’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘main’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘main’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘load_xinfo_from_proc_unix’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 152)’
util-linux-2.43.devel/lsfd-cmd/lsfd.h:40: included_from: Included from here.
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 208)’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
#   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):
util-linux-2.43.devel/sys-utils/lscpu.h:20: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.c:39: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 224)’
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/sys-utils/lscpu.c: scope_hint: In function ‘main’
util-linux-2.43.devel/sys-utils/lscpu.c:34: included_from: Included from here.
#   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):
util-linux-2.43.devel/misc-utils/kill.c:67: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘parse_arguments’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 24)’
#   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):
util-linux-2.43.devel/disk-utils/fsck.c:64: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘execute’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 240)’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fsck.c:58: included_from: Included from here.
util-linux-2.43.devel/disk-utils/fsck.c: scope_hint: In function ‘execute’
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘load_xinfo_from_proc_packet’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 32)’
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘load_xinfo_from_proc_netlink’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 40)’
#   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):
util-linux-2.43.devel/lsfd-cmd/lsfd.h:41: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/sock-xinfo.c:49: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘handle_diag_vsock.part.0’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 48)’
#   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):
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 56)’
util-linux-2.43.devel/include/c.h:19: included_from: Included from here.
#   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):
util-linux-2.43.devel/sys-utils/zramctl.c:40: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘status’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 72)’
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘status’
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘status’
#   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):
util-linux-2.43.devel/sys-utils/lsipc.c:42: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 8)’
util-linux-2.43.devel/sys-utils/lsipc.c:41: included_from: Included from here.
#   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):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘main’
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 96)’
#   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):
util-linux-2.43.devel/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(n_args, 8)’
#   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):
util-linux-2.43.devel/include/xalloc.h:70:16: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
#   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):
util-linux-2.43.devel/misc-utils/lsblk-properties.c:10: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘lookup.part.0’
util-linux-2.43.devel/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.label’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/misc-utils/lsblk-properties.c:8: included_from: Included from here.
util-linux-2.43.devel/misc-utils/lsblk.h:20: included_from: Included from here.
util-linux-2.43.devel/misc-utils/lsblk-properties.c:16: included_from: Included from here.
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘lookup.part.0’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.partlabel’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘lookup.part.0’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.ptuuid’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘lookup.part.0’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/include/xalloc.h:96:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.uuid’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘lookup.part.0’
#   94|   	if (!ret)
#   95|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#   96|-> 	return ret;
#   97|   }
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/include/xalloc.h:110:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  108|   	if (!ret)
#  109|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#  110|-> 	return ret;
#  111|   }
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/include/xalloc.h:110:16: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
/usr/include/libintl.h:100: included_from: Included from here.
util-linux-2.43.devel/include/nls.h:27: included_from: Included from here.
util-linux-2.43.devel/text-utils/hexdump-parse.c:45: included_from: Included from here.
#  108|   	if (!ret)
#  109|   		err(XALLOC_EXIT_CODE, "cannot duplicate string");
#  110|-> 	return ret;
#  111|   }
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘xgethostname’
util-linux-2.43.devel/include/xalloc.h:186:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(sz)’ where non-null expected
/usr/include/bits/sigstksz.h:24: included_from: Included from here.
/usr/include/signal.h:328: included_from: Included from here.
/usr/include/sys/param.h:28: included_from: Included from here.
util-linux-2.43.devel/term-utils/wall.c:45: included_from: Included from here.
/usr/include/unistd.h:911:12: note: argument 1 of ‘gethostname’ must be non-null
#  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):
util-linux-2.43.devel/lib/colors.c: scope_hint: In function 'colors_add_scheme'
util-linux-2.43.devel/lib/colors.c:392:12: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(name)'
util-linux-2.43.devel/lib/colors.c:38: included_from: Included from here.
util-linux-2.43.devel/lib/colors.c:60:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/lib/colors.c:507:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/lib/colors.c:60:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/lib/colors.c:507:9: note: in expansion of macro 'DBG'
/usr/include/features.h:540: included_from: Included from here.
/usr/include/assert.h:35: included_from: Included from here.
util-linux-2.43.devel/lib/colors.c:8: included_from: Included from here.
util-linux-2.43.devel/lib/colors.c:60:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/lib/colors.c:371:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/lib/colors.c:60:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/lib/colors.c:371:9: note: in expansion of macro 'DBG'
#  390|   	cs->seq = seq;
#  391|   	cs->name = strdup(name);
#  392|-> 	if (!cs->name)
#  393|   		goto err;
#  394|   

Error: GCC_ANALYZER_WARNING:
util-linux-2.43.devel/lib/pager.c: scope_hint: In function ‘pager_close’
util-linux-2.43.devel/lib/pager.c:292:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
#  290|   	/* restore original output */
#  291|   	clearerr(stdout);
#  292|-> 	dup2(pager_process.org_out, STDOUT_FILENO);
#  293|   	clearerr(stderr);
#  294|   	dup2(pager_process.org_err, STDERR_FILENO);

Error: GCC_ANALYZER_WARNING:
util-linux-2.43.devel/lib/pager.c:294:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
#  292|   	dup2(pager_process.org_out, STDOUT_FILENO);
#  293|   	clearerr(stderr);
#  294|-> 	dup2(pager_process.org_err, STDERR_FILENO);
#  295|   
#  296|   	close(pager_process.org_out);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/lib/path.c: scope_hint: In function 'ul_path_read_buffer'
util-linux-2.43.devel/lib/path.c:758:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/lib/path.c:24: included_from: Included from here.
util-linux-2.43.devel/lib/path.c:28: included_from: Included from here.
util-linux-2.43.devel/lib/path.c:40:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/lib/path.c:480:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/lib/path.c:22: included_from: Included from here.
#  756|   	else if (rc > 0) {
#  757|   		/* Remove trailing newline (usual in sysfs) */
#  758|-> 		if (*(buf + rc - 1) == '\n')
#  759|   			buf[--rc] = '\0';
#  760|   		else

Error: GCC_ANALYZER_WARNING (CWE-465):
util-linux-2.43.devel/lib/pidutils.c: scope_hint: In function 'ul_parse_pid_str'
util-linux-2.43.devel/lib/pidutils.c:56:12: warning[-Wanalyzer-deref-before-check]: check of 'end' for NULL after already dereferencing it
#   54|   	}
#   55|   
#   56|-> 	if (end && *end != '\0')
#   57|   		return -(errno = EINVAL);
#   58|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/lib/randutils.c:20: included_from: Included from here.
util-linux-2.43.devel/lib/randutils.c: scope_hint: In function 'ul_random_get_bytes'
util-linux-2.43.devel/lib/randutils.c:63:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'random_get_fd()'
util-linux-2.43.devel/include/randutils.h:8:33: note: in definition of macro 'srand'
util-linux-2.43.devel/include/randutils.h:8:33: note: in definition of macro 'srand'
#   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):
util-linux-2.43.devel/libblkid/src/partitions/partitions.c: scope_hint: In function 'unref_parttable'
util-linux-2.43.devel/libblkid/src/partitions/partitions.c:331:12: warning[-Wanalyzer-use-after-free]: use after 'free' of 'tab'
util-linux-2.43.devel/libblkid/src/partitions/partitions.c: scope_hint: In function 'unref_parttable'
util-linux-2.43.devel/libblkid/src/blkidP.h:30: included_from: Included from here.
util-linux-2.43.devel/libblkid/src/partitions/partitions.h:4: included_from: Included from here.
util-linux-2.43.devel/libblkid/src/partitions/partitions.c:23: included_from: Included from here.
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/partitions/partitions.c:346:39: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/partitions/partitions.c:346:39: note: in expansion of macro 'list_entry'
#  329|   		return;
#  330|   
#  331|-> 	tab->nparts--;
#  332|   	if (tab->nparts <= 0) {
#  333|   		list_del(&tab->t_tabs);

Error: GCC_ANALYZER_WARNING (CWE-415):
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c:279:9: warning[-Wanalyzer-double-free]: double-'free' of '*v.data'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2135:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:150:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2438:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_free_value.part.0'
util-linux-2.43.devel/libblkid/src/probe.c:662:9: note: in expansion of macro 'list_for_each_safe'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:900:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:903:41: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:281:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:903:41: note: in expansion of macro 'list_entry'
#  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):
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/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.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2135:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:150:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2438:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c:662:9: note: in expansion of macro 'list_for_each_safe'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:2602:40: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:2602:40: note: in expansion of macro 'list_entry'
# 2603|   						struct blkid_hint, hints);
# 2604|   		list_del(&h->hints);
# 2605|-> 		free(h->name);
# 2606|   		free(h);
# 2607|   	}

Error: GCC_ANALYZER_WARNING (CWE-415):
util-linux-2.43.devel/libblkid/src/probe.c:2606:17: warning[-Wanalyzer-double-free]: double-'free' of '((struct list_head *)pr)[8].next + -16'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2135:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:150:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2438:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c: scope_hint: In function 'blkid_probe_reset_hints'
util-linux-2.43.devel/libblkid/src/probe.c:662:9: note: in expansion of macro 'list_for_each_safe'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libblkid/src/blkidP.h:355:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libblkid/src/probe.c:2599:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:2602:40: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libblkid/src/probe.c:2602:40: note: in expansion of macro 'list_entry'
# 2604|   		list_del(&h->hints);
# 2605|   		free(h->name);
# 2606|-> 		free(h);
# 2607|   	}
# 2608|   

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/libblkid/src/topology/dm.c:118:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dmpipe[0]'
#  116|   
#  117|   	fclose(stream);
#  118|-> 	return 0;
#  119|   
#  120|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/libblkid/src/topology/dm.c: scope_hint: In function 'probe_dm_tp'
util-linux-2.43.devel/libblkid/src/topology/dm.c:118:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dmpipe[1]'
#  116|   
#  117|   	fclose(stream);
#  118|-> 	return 0;
#  119|   
#  120|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/libblkid/src/topology/lvm.c:125:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lvpipe[0]'
#  123|   	fclose(stream);
#  124|   	close(lvpipe[1]);
#  125|-> 	return 0;
#  126|   
#  127|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/libblkid/src/topology/lvm.c: scope_hint: In function 'probe_lvm_tp'
util-linux-2.43.devel/libblkid/src/topology/lvm.c:125:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lvpipe[1]'
#  123|   	fclose(stream);
#  124|   	close(lvpipe[1]);
#  125|-> 	return 0;
#  126|   
#  127|   nothing:

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c: scope_hint: In function 'll2_update_login_time'
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:365:24: warning[-Wanalyzer-malloc-leak]: leak of 'tty'
#  363|   	retval = open_database_rw(context , &db, error);
#  364|   	if (retval != 0)
#  365|-> 		return retval;
#  366|   
#  367|   	retval = read_entry(db, user, 0, &tty, &rhost, &pam_service, error);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:373:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service'
#  371|   	}
#  372|   
#  373|-> 	retval = write_entry(db, user, ll_time, tty, rhost, pam_service, error);
#  374|   
#  375|   	sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:373:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost'
#  371|   	}
#  372|   
#  373|-> 	retval = write_entry(db, user, ll_time, tty, rhost, pam_service, error);
#  374|   
#  375|   	sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:527:24: warning[-Wanalyzer-malloc-leak]: leak of 'pam_service'
#  525|   	retval = open_database_rw(context, &db, error);
#  526|   	if (retval != 0)
#  527|-> 		return retval;
#  528|   
#  529|   	retval = read_entry(db, user, &ll_time, &tty, &rhost, &pam_service, error);

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c: scope_hint: In function 'll2_rename_user'
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:527:24: warning[-Wanalyzer-malloc-leak]: leak of 'tty'
#  525|   	retval = open_database_rw(context, &db, error);
#  526|   	if (retval != 0)
#  527|-> 		return retval;
#  528|   
#  529|   	retval = read_entry(db, user, &ll_time, &tty, &rhost, &pam_service, error);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:535:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service'
#  533|   	}
#  534|   
#  535|-> 	retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error);
#  536|   	if (retval != 0) {
#  537|   		sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/liblastlog2/src/lastlog2.c:535:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost'
#  533|   	}
#  534|   
#  535|-> 	retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error);
#  536|   	if (retval != 0) {
#  537|   		sqlite3_close(db);

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_dir'
util-linux-2.43.devel/libmount/src/fs.c:447:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:628:9: note: in expansion of macro 'mnt_fs_try_statmount'
#  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):
util-linux-2.43.devel/libmount/src/fs.c: scope_hint: In function 'update_str'
util-linux-2.43.devel/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_fsname'
util-linux-2.43.devel/libmount/src/fs.c:23: included_from: Included from here.
util-linux-2.43.devel/libmount/src/fs.c:447:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/libmount/src/mountP.h:29: included_from: Included from here.
#  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):
util-linux-2.43.devel/libmount/src/fs.c:165:1: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_type'
util-linux-2.43.devel/libmount/src/fs.c:447:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:628:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:823:9: note: in expansion of macro 'mnt_fs_try_statmount'
#  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):
util-linux-2.43.devel/libmount/src/fs.c: scope_hint: In function 'mnt_fs_to_mntent'
util-linux-2.43.devel/libmount/src/fs.c:2026:12: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_opts'
util-linux-2.43.devel/libmount/src/fs.c:447:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:628:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:823:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/mountP.h:17: included_from: Included from here.
# 2024|   	errno = 0;
# 2025|   	m->mnt_opts = mnt_fs_strdup_options(fs);
# 2026|-> 	if (!m->mnt_opts && errno) {
# 2027|   		rc = -errno;
# 2028|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/libmount/src/fs.c:2036:20: warning[-Wanalyzer-malloc-leak]: leak of '*m.mnt_fsname'
util-linux-2.43.devel/libmount/src/fs.c:447:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:628:9: note: in expansion of macro 'mnt_fs_try_statmount'
util-linux-2.43.devel/libmount/src/fs.c:823:9: note: in expansion of macro 'mnt_fs_try_statmount'
# 2034|   	if (!m->mnt_fsname) {
# 2035|   		m->mnt_fsname = strdup("none");
# 2036|-> 		if (!m->mnt_fsname)
# 2037|   			goto err;
# 2038|   	}

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/libmount/src/hook_idmap.c: scope_hint: In function 'hook_prepare_options'
util-linux-2.43.devel/libmount/src/hook_idmap.c:465:25: warning[-Wanalyzer-malloc-leak]: leak of 'idmap'
util-linux-2.43.devel/libmount/src/mountP.h:31: included_from: Included from here.
util-linux-2.43.devel/libmount/src/hook_idmap.c:28: included_from: Included from here.
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libmount/src/hook_idmap.c:24: included_from: Included from here.
#  463|   			goto err;
#  464|   
#  465|-> 		idmap = calloc(1, sizeof(*idmap));
#  466|   		if (!idmap)
#  467|   			goto err;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/libmount/src/monitor.c: scope_hint: In function 'mnt_monitor_next_change'
util-linux-2.43.devel/libmount/src/monitor.c:444:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/libmount/src/mountP.h:29: included_from: Included from here.
util-linux-2.43.devel/libmount/src/monitor.c:38: included_from: Included from here.
#  442|   	}
#  443|   
#  444|-> 	me->active = 0;
#  445|   	mn->last = me;
#  446|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/libmount/src/optlist.c:17: included_from: Included from here.
util-linux-2.43.devel/libmount/src/optlist.c: scope_hint: In function 'mnt_copy_optlist'
util-linux-2.43.devel/libmount/src/optlist.c:428:24: 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.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/include/strutils.h:19: included_from: Included from here.
util-linux-2.43.devel/libmount/src/optlist.c:16: included_from: Included from here.
util-linux-2.43.devel/include/list.h:176:41: note: in expansion of macro 'container_of'
util-linux-2.43.devel/libmount/src/mountP.h:195:17: note: in expansion of macro 'list_entry'
util-linux-2.43.devel/libmount/src/optlist.c:240:32: note: in expansion of macro 'MNT_ITER_GET_ENTRY'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
util-linux-2.43.devel/libmount/src/mountP.h:32: included_from: Included from here.
util-linux-2.43.devel/libmount/src/optlist.c:18: included_from: Included from here.
util-linux-2.43.devel/libmount/src/mountP.h:63:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libmount/src/optlist.c:490:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libmount/src/mountP.h:63:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libmount/src/optlist.c:490:17: note: in expansion of macro 'DBG'
util-linux-2.43.devel/include/list.h:39:24: note: in definition of macro 'INIT_LIST_HEAD'
#  426|   		return NULL;
#  427|   
#  428|-> 	INIT_LIST_HEAD(&opt->opts);
#  429|   	opt->map = map;
#  430|   	opt->ent = ent;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/libmount/src/tab.c: scope_hint: In function 'mnt_table_find_target'
util-linux-2.43.devel/libmount/src/tab.c:1196:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fs'
util-linux-2.43.devel/libmount/src/mountP.h:32: included_from: Included from here.
util-linux-2.43.devel/libmount/src/tab.c:52: included_from: Included from here.
util-linux-2.43.devel/libmount/src/mountP.h:63:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libmount/src/tab.c:1154:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libmount/src/mountP.h:63:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libmount/src/tab.c:1179:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libmount/src/mountP.h:189:28: note: in expansion of macro 'IS_ITER_FORWARD'
util-linux-2.43.devel/libmount/src/tab.c:868:17: note: in expansion of macro 'MNT_ITER_INIT'
# 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):
util-linux-2.43.devel/libmount/src/utils.c: scope_hint: In function 'mnt_free_filesystems.part.0'
util-linux-2.43.devel/libmount/src/utils.c:576:31: warning[-Wanalyzer-use-after-free]: use after 'reallocarray' of 'p'
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/strutils.h:19: included_from: Included from here.
util-linux-2.43.devel/libmount/src/utils.c:24: included_from: Included from here.
#  574|   	if (!filesystems)
#  575|   		return;
#  576|-> 	for (p = filesystems; *p; p++)
#  577|   		free(*p);
#  578|   	free(filesystems);

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:444:15: warning[-Wanalyzer-malloc-leak]: leak of 'yyptr'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:98:40: note: in definition of macro 'YY_CAST'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:382:25: note: in expansion of macro 'YYMALLOC'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1288:20: note: in expansion of macro 'YYSTACK_ALLOC'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:441:9: note: in expansion of macro 'YYCOPY'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
#  442|           Stack = &yyptr->Stack_alloc;                                    \
#  443|           yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
#  444|->         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
#  445|         }                                                                 \
#  446|       while (0)

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/libsmartcols/src/filter-parser.c: scope_hint: In function 'yyparse'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:456:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:441:9: note: in expansion of macro 'YYCOPY'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:441:9: note: in expansion of macro 'YYCOPY'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:441:9: note: in expansion of macro 'YYCOPY'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1291:9: note: in expansion of macro 'YYSTACK_RELOCATE'
#  454|   #  if defined __GNUC__ && 1 < __GNUC__
#  455|   #   define YYCOPY(Dst, Src, Count) \
#  456|->       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  457|   #  else
#  458|   #   define YYCOPY(Dst, Src, Count)              \

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:81:76: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyvsp[1152921504606846975].param'
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:82:64: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:82:64: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:83:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:83:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:85:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:85:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:86:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:86:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:87:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:87:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:88:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:88:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:89:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:89:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:90:65: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:90:65: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:95:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:95:33: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:101:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
util-linux-2.43.devel/libsmartcols/src/filter-parser.c:1358:17: note: in expansion of macro 'YYTRANSLATE'
util-linux-2.43.devel/libsmartcols/src/filter-parser.y:101:33: note: valid subscripts for 'yyvsa' are '[0]' to '[199]'
#   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):
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_create_buffer'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c:1483:70: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_create_buffer'
# 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):
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_create_buffer'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c:1483:70: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(64, yyscanner)'
# 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):
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_init_buffer'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c:1526:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
# 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):
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_scan_buffer'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c:1744:38: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(n)'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_scan_buffer'
# 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):
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c: scope_hint: In function 'yy_scan_buffer'
util-linux-2.43.devel/libsmartcols/src/filter-scanner.c:1744:38: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(n,  yyscanner)'
# 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):
util-linux-2.43.devel/libsmartcols/src/print.c: scope_hint: In function 'print_json_data'
util-linux-2.43.devel/libsmartcols/src/print.c:544:71: warning[-Wanalyzer-null-dereference]: dereference of NULL 'data'
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:14: included_from: Included from here.
util-linux-2.43.devel/libsmartcols/src/print.c:26: included_from: Included from here.
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:19: included_from: Included from here.
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/print.c:884:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/print.c:865:9: note: in expansion of macro 'DBG'
#  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):
util-linux-2.43.devel/libsmartcols/src/print.c:548:42: warning[-Wanalyzer-null-dereference]: dereference of NULL 'data'
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/print.c:884:9: note: in expansion of macro 'DBG'
util-linux-2.43.devel/libsmartcols/src/smartcolsP.h:42:25: note: in expansion of macro '__UL_DBG'
util-linux-2.43.devel/libsmartcols/src/print.c:865:9: note: in expansion of macro 'DBG'
#  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):
util-linux-2.43.devel/login-utils/chfn.c: scope_hint: In function ‘parse_passwd’
util-linux-2.43.devel/login-utils/chfn.c:241:1: warning[-Wanalyzer-malloc-leak]: leak of ‘gecos’
util-linux-2.43.devel/login-utils/chfn.c:44: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/login-utils/chfn.c:35: included_from: Included from here.
#  239|   	 *  not be changed by this version of chfn.  */
#  240|   	ctl->oldf.other = strsep(&gecos, ",");
#  241|-> }
#  242|   
#  243|   /*

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/login-utils/last.c: scope_hint: In function ‘process_wtmp_file’
util-linux-2.43.devel/login-utils/last.c:195:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
util-linux-2.43.devel/login-utils/last.c:48: included_from: Included from here.
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
util-linux-2.43.devel/login-utils/last.c:46: included_from: Included from here.
#  193|   	off_t o;
#  194|   
#  195|-> 	if (quit == NULL && u != NULL) {
#  196|   		/*
#  197|   		 *	Normal read.

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/login-utils/last.c:195:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  193|   	off_t o;
#  194|   
#  195|-> 	if (quit == NULL && u != NULL) {
#  196|   		/*
#  197|   		 *	Normal read.

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/login-utils/last.c: scope_hint: In function ‘main’
util-linux-2.43.devel/login-utils/last.c:1042:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘files’
# 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):
util-linux-2.43.devel/login-utils/login.c: scope_hint: In function ‘process_title_init’
util-linux-2.43.devel/login-utils/login.c:251:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘environ’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/path.h:14: included_from: Included from here.
util-linux-2.43.devel/login-utils/login.c:49: included_from: Included from here.
#  249|   
#  250|   	for (i = 0; envp[i] != NULL; i++)
#  251|-> 		environ[i] = xstrdup(envp[i]);
#  252|   	environ[i] = NULL;
#  253|   

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/login-utils/login.c:252:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘environ’
#  250|   	for (i = 0; envp[i] != NULL; i++)
#  251|   		environ[i] = xstrdup(envp[i]);
#  252|-> 	environ[i] = NULL;
#  253|   
#  254|   	if (i > 0)

Error: GCC_ANALYZER_WARNING (CWE-1341):
util-linux-2.43.devel/login-utils/login.c: scope_hint: In function ‘open_tty’
util-linux-2.43.devel/login-utils/login.c:473:17: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘i’
util-linux-2.43.devel/login-utils/login.c:36: included_from: Included from here.
#  471|   
#  472|   	for (i = 0; i < fd; i++)
#  473|-> 		close(i);
#  474|   	for (i = 0; i < 3; i++)
#  475|   		if (fd != i)

Error: GCC_ANALYZER_WARNING:
util-linux-2.43.devel/login-utils/login.c:476:25: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘i’
#  474|   	for (i = 0; i < 3; i++)
#  475|   		if (fd != i)
#  476|-> 			dup2(fd, i);
#  477|   	if (fd >= 3)
#  478|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘parse_utmpx.part.0’
util-linux-2.43.devel/login-utils/lslogins.c:530:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ary’
#  528|   		if (i == imax)
#  529|   			ary = xreallocarray(ary, imax *= 2, sizeof(struct utmpx));
#  530|-> 		ary[i] = *u;
#  531|   	}
#  532|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘create_usertree’
util-linux-2.43.devel/login-utils/lslogins.c:813:28: warning[-Wanalyzer-malloc-leak]: leak of ‘get_next_user(ctl)’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘create_usertree’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘create_usertree’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
#  811|   	/* nfsnobody is an exception to the UID_MAX limit.  This is "nobody" on
#  812|   	 * some systems; the decisive point is the UID - 65534 */
#  813|-> 	if ((lslogins_flag & F_USRAC) &&
#  814|   	    strcmp("nfsnobody", pwd->pw_name) != 0 &&
#  815|   	    uid != 0) {

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:847:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/login-utils/lslogins.c:53: included_from: Included from here.
#  845|   
#  846|   	while (n < ncolumns) {
#  847|-> 		switch (columns[n++]) {
#  848|   		case COL_USER:
#  849|   			if (!user->login)

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/login-utils/lslogins.c:864:45: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_user_info’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
#  862|   		case COL_SGROUPS:
#  863|   		case COL_SGIDS:
#  864|-> 			if (!user->nsgroups &&
#  865|   			    get_sgroups(&user->sgroups, &user->nsgroups, pwd) < 0)
#  866|   				err(EXIT_FAILURE, _("failed to get supplementary groups"));

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_ulist’
util-linux-2.43.devel/login-utils/lslogins.c:1075:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_ulist’
util-linux-2.43.devel/login-utils/lslogins.c:1699:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
util-linux-2.43.devel/login-utils/lslogins.c: scope_hint: In function ‘get_ulist’
util-linux-2.43.devel/login-utils/lslogins.c:1700:9: note: in expansion of macro ‘add_column’
# 1073|   
# 1074|   	if (logins) {
# 1075|-> 		while ((u = strtok(logins, ","))) {
# 1076|   			logins = NULL;
# 1077|   

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/login-utils/su-common.c:803:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(strlen(shell_basename) + 2)’
#  801|   		shell_basename = basename(tmp);
#  802|   		arg0 = xmalloc(strlen(shell_basename) + 2);
#  803|-> 		arg0[0] = '-';
#  804|   		strcpy(arg0 + 1, shell_basename);
#  805|   		args[0] = arg0;

Error: GCC_ANALYZER_WARNING:
util-linux-2.43.devel/login-utils/sulogin.c: scope_hint: In function ‘setup’
util-linux-2.43.devel/login-utils/sulogin.c:726:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’
#  724|   	}
#  725|   notty:
#  726|-> 	dup2(fd, STDIN_FILENO);
#  727|   	dup2(fd, STDOUT_FILENO);
#  728|   	dup2(fd, STDERR_FILENO);

Error: GCC_ANALYZER_WARNING:
util-linux-2.43.devel/login-utils/sulogin.c:727:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
#  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:
util-linux-2.43.devel/login-utils/sulogin.c:728:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
#  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):
util-linux-2.43.devel/lsfd-cmd/cdev.c: scope_hint: In function ‘read_tty_drivers’
util-linux-2.43.devel/lsfd-cmd/cdev.c:225:61: warning[-Wanalyzer-malloc-leak]: leak of ‘read_ttydrv(&line)’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/sys/stat.h:25: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.h:28: included_from: Included from here.
#  223|   	}
#  224|   
#  225|-> 	return new_ttydrv(major, minor_range[0], minor_range[1], name);
#  226|   }
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘new_file’
util-linux-2.43.devel/lsfd-cmd/lsfd.c:747:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *class.size)’
#  745|   	assert(class);
#  746|   	file = xcalloc(1, class->size);
#  747|-> 	file->class = class;
#  748|   
#  749|   	file->proc = proc;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘new_error_file_common’
util-linux-2.43.devel/lsfd-cmd/lsfd.c:768:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *error_class.size)’
util-linux-2.43.devel/include/c.h:19: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘new_error_file_common’
#  766|   
#  767|   	file = xcalloc(1, error_class->size);
#  768|-> 	file->class = error_class;
#  769|   
#  770|   	file->proc = proc;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘parse_pids’
util-linux-2.43.devel/lsfd-cmd/lsfd.c:2225:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘outarg’
# 2223|   	       && (isspace((unsigned char)*next) || *next == ','))
# 2224|   		next++;
# 2225|-> 	if (*next != '\0')
# 2226|   		parse_pids(next, pids, count);
# 2227|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/lsfd-cmd/lsfd.c: scope_hint: In function ‘main’
util-linux-2.43.devel/lsfd-cmd/lsfd.c:2418:21: warning[-Wanalyzer-malloc-leak]: leak of ‘new_counter_spec(optarg)’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/bits/libc-header-start.h:33: included_from: Included from here.
/usr/include/stdio.h:28: included_from: Included from here.
util-linux-2.43.devel/lsfd-cmd/lsfd.c:25: included_from: Included from here.
# 2416|   	struct counter_spec *spec;
# 2417|   
# 2418|-> 	if (spec_str[0] == '\0')
# 2419|   		errx(EXIT_FAILURE,
# 2420|   		     _("too short counter specification: -C/--counter %s"),

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/blkid.c: scope_hint: In function ‘main’
util-linux-2.43.devel/misc-utils/blkid.c:882:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8) + (long unsigned int)numdev * 8’
util-linux-2.43.devel/misc-utils/blkid.c:49: included_from: Included from here.
util-linux-2.43.devel/misc-utils/blkid.c:18: included_from: Included from here.
#  880|   				continue;
#  881|   
#  882|-> 			devices[numdev++] = dev;
#  883|   		}
#  884|   

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/cal.c: scope_hint: In function ‘monthly’
util-linux-2.43.devel/misc-utils/cal.c:1099:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208)’
util-linux-2.43.devel/misc-utils/cal.c:79: included_from: Included from here.
# 1097|   
# 1098|   	for (i = 0; i < ctl->months_in_row - 1; i++)
# 1099|-> 		ms[i].next = &ms[i + 1];
# 1100|   
# 1101|   	rows = (ctl->num_months - 1) / ctl->months_in_row;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/copyfilerange.c: scope_hint: In function ‘main’
util-linux-2.43.devel/misc-utils/copyfilerange.c:221:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘range_files’
util-linux-2.43.devel/misc-utils/copyfilerange.c:34: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/misc-utils/copyfilerange.c:31: included_from: Included from here.
#  219|   			if (!range_files)
#  220|   				range_files = xmalloc(sizeof(char *) * argc);
#  221|-> 			range_files[nrange_files++] = xstrdup(optarg);
#  222|   			break;
#  223|   		case 'v':

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/enosys.c:117:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 25, & ioctls, 1)’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/getopt.h:24: included_from: Included from here.
util-linux-2.43.devel/misc-utils/enosys.c:20: included_from: Included from here.
util-linux-2.43.devel/misc-utils/enosys.c:34: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/misc-utils/enosys.c:28: included_from: Included from here.
#  115|   	colon = strchr(s, ':');
#  116|   	if (colon) {
#  117|-> 		name = xstrndup(s, colon - s);
#  118|   		error_name = colon + 1;
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/enosys.c:117:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 38, & syscalls, 385)’
#  115|   	colon = strchr(s, ':');
#  116|   	if (colon) {
#  117|-> 		name = xstrndup(s, colon - s);
#  118|   		error_name = colon + 1;
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/enosys.c:137:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 25, & ioctls, 1)’
#  135|   	found = 0;
#  136|   	for (i = 0; i < n_entities; i++) {
#  137|-> 		if (strcmp(name, entities[i].name) == 0) {
#  138|   			blocked_number = entities[i].number;
#  139|   			found = 1;

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/enosys.c:137:42: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_block(optarg, 38, & syscalls, 385)’
#  135|   	found = 0;
#  136|   	for (i = 0; i < n_entities; i++) {
#  137|-> 		if (strcmp(name, entities[i].name) == 0) {
#  138|   			blocked_number = entities[i].number;
#  139|   			found = 1;

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/enosys.c: scope_hint: In function ‘parse_block’
util-linux-2.43.devel/misc-utils/enosys.c:154:16: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
#  152|   		free((char *)name);
#  153|   
#  154|-> 	return blocked;
#  155|   }
#  156|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/misc-utils/getopt.c: scope_hint: In function ‘main’
util-linux-2.43.devel/misc-utils/getopt.c:436:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ctl.optstr’ where non-null expected
util-linux-2.43.devel/misc-utils/getopt.c:73: included_from: Included from here.
util-linux-2.43.devel/misc-utils/getopt.c:62: included_from: Included from here.
/usr/include/string.h:156:14: note: argument 1 of ‘strcpy’ must be non-null
#  434|   		ctl.quote = 0;
#  435|   		ctl.optstr = xmalloc(strlen(argv[1]) + 1);
#  436|-> 		strcpy(ctl.optstr, argv[1] + strspn(argv[1], "-+"));
#  437|   		argv[1] = argv[0];
#  438|   		return generate_output(&ctl, argv + 1, argc - 1);

Error: CPPCHECK_WARNING (CWE-401):
util-linux-2.43.devel/misc-utils/getopt.c:467: error[memleak]: Memory leak: ctl.name
#  465|   			break;
#  466|   		case 'T':
#  467|-> 			return TEST_EXIT_CODE;
#  468|   		case 'u':
#  469|   			ctl.quote = 0;

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’
util-linux-2.43.devel/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.43.devel/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
util-linux-2.43.devel/misc-utils/hardlink.c:58: included_from: Included from here.
util-linux-2.43.devel/misc-utils/hardlink.c:251:21: note: in expansion of macro ‘is_log_enabled’
util-linux-2.43.devel/misc-utils/hardlink.c:562:9: note: in expansion of macro ‘jlog’
util-linux-2.43.devel/misc-utils/hardlink.c:55: included_from: Included from here.
util-linux-2.43.devel/include/c.h:17: included_from: Included from here.
util-linux-2.43.devel/misc-utils/hardlink.c:54: included_from: Included from here.
/usr/include/stdlib.h:998:13: note: argument 1 of ‘qsort’ must be non-null
#  530|   	}
#  531|   
#  532|-> 	qsort(table, n, sizeof(char *), cmp_xattr_name_ptrs);
#  533|   
#  534|   	return table;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/kill.c:405:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/ctype.h:25: included_from: Included from here.
util-linux-2.43.devel/misc-utils/kill.c:48: included_from: Included from here.
#  403|   		if (!strncmp(arg, "--list=", 7) || !strncmp(arg, "-l=", 3)) {
#  404|   			char *p = strchr(arg, '=') + 1;
#  405|-> 			if (p[0] == '0' && p[1] == 'x') {
#  406|   				uint64_t sigmask;
#  407|   				if (ul_strtou64(p + 2, &sigmask, 16) < 0)

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/look.c: scope_hint: In function ‘compare’
util-linux-2.43.devel/misc-utils/look.c:337:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
util-linux-2.43.devel/misc-utils/look.c:61: included_from: Included from here.
util-linux-2.43.devel/misc-utils/look.c:57: included_from: Included from here.
#  335|   		if (!dflag || isalnum(*s2) || isblank(*s2))
#  336|   		{
#  337|-> 			*p++ = *s2;
#  338|   			i--;
#  339|   		}

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/look.c:342:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
#  340|   		s2++;
#  341|   	}
#  342|-> 	*p = 0;
#  343|   
#  344|   	/* and compare */

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/lsblk.h:18: included_from: Included from here.
util-linux-2.43.devel/misc-utils/lsblk-devtree.c: scope_hint: In function ‘cmp_devices_devno’
util-linux-2.43.devel/misc-utils/lsblk-devtree.c:536:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘a’
util-linux-2.43.devel/include/c.h:231:29: note: in definition of macro ‘cmp_numbers’
util-linux-2.43.devel/include/c.h:231:29: note: in definition of macro ‘cmp_numbers’
#  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):
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:257:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.pttype’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
#  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):
util-linux-2.43.devel/misc-utils/lsblk-properties.c:258:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.fstype’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
#  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):
util-linux-2.43.devel/misc-utils/lsblk-properties.c:259:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*prop.fsversion’
util-linux-2.43.devel/misc-utils/lsblk.h:30:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c:225:9: note: in expansion of macro ‘DBG’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
util-linux-2.43.devel/misc-utils/lsblk-properties.c: scope_hint: In function ‘get_properties_by_file’
#  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):
util-linux-2.43.devel/misc-utils/mcookie.c: scope_hint: In function ‘randomness_from_files’
util-linux-2.43.devel/misc-utils/mcookie.c:126:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
#  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):
util-linux-2.43.devel/misc-utils/mcookie.c:137:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
#  135|   		}
#  136|   	}
#  137|-> }
#  138|   
#  139|   int main(int argc, char **argv)

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/mcookie.c: scope_hint: In function ‘main’
util-linux-2.43.devel/misc-utils/mcookie.c:169:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ctl.files’
util-linux-2.43.devel/misc-utils/mcookie.c:31: included_from: Included from here.
#  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):
util-linux-2.43.devel/misc-utils/namei.c: scope_hint: In function ‘readlink_to_namei’
util-linux-2.43.devel/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.43.devel/misc-utils/namei.c:39: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/misc-utils/namei.c:38: included_from: Included from here.
util-linux-2.43.devel/misc-utils/namei.c:29: included_from: Included from here.
/usr/include/features.h:540: included_from: Included from here.
/usr/include/bits/libc-header-start.h:33: included_from: Included from here.
/usr/include/stdio.h:28: included_from: Included from here.
util-linux-2.43.devel/misc-utils/namei.c:22: included_from: Included from here.
util-linux-2.43.devel/misc-utils/namei.c:25: included_from: Included from here.
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  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):
util-linux-2.43.devel/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
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  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):
util-linux-2.43.devel/misc-utils/namei.c: scope_hint: In function ‘dotdot_stat’
util-linux-2.43.devel/misc-utils/namei.c:142:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 4)’ where non-null expected
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  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):
util-linux-2.43.devel/misc-utils/rename.c: scope_hint: In function ‘string_replace’
util-linux-2.43.devel/misc-utils/rename.c:91:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/bits/libc-header-start.h:33: included_from: Included from here.
/usr/include/stdio.h:28: included_from: Included from here.
util-linux-2.43.devel/misc-utils/rename.c:16: included_from: Included from here.
util-linux-2.43.devel/misc-utils/rename.c:37: included_from: Included from here.
#   89|   	while (count--) {
#   90|   		while (p < where)
#   91|-> 			*q++ = *p++;
#   92|   		p = to;
#   93|   		while (*p)

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/rename.c:94:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
#   92|   		p = to;
#   93|   		while (*p)
#   94|-> 			*q++ = *p++;
#   95|   		if (fromlen > 0) {
#   96|   			p = where + fromlen;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/rename.c:104:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
util-linux-2.43.devel/misc-utils/rename.c:40: included_from: Included from here.
util-linux-2.43.devel/misc-utils/rename.c:34: included_from: Included from here.
#  102|   	}
#  103|   	while (*p)
#  104|-> 		*q++ = *p++;
#  105|   	*q = 0;
#  106|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/rename.c:105:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
#  103|   	while (*p)
#  104|   		*q++ = *p++;
#  105|-> 	*q = 0;
#  106|   	return 0;
#  107|   }

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/misc-utils/rename.c: scope_hint: In function ‘do_symlink’
util-linux-2.43.devel/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.43.devel/misc-utils/rename.c:31: included_from: Included from here.
/usr/include/unistd.h:838:16: note: argument 2 of ‘readlink’ must be non-null
#  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):
util-linux-2.43.devel/misc-utils/uuidd.c: scope_hint: In function ‘create_socket’
util-linux-2.43.devel/misc-utils/uuidd.c:283:21: warning[-Wanalyzer-fd-phase-mismatch]: ‘dup’ on file descriptor ‘s’ in wrong phase
util-linux-2.43.devel/misc-utils/uuidd.c:51: included_from: Included from here.
#  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):
util-linux-2.43.devel/misc-utils/uuidd.c:305:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
#  303|   	uuidd_cxt->cleanup_socket = socket_path;
#  304|   
#  305|-> 	return s;
#  306|   }
#  307|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/misc-utils/wipefs.c: scope_hint: In function ‘get_desc_for_probe’
util-linux-2.43.devel/misc-utils/wipefs.c:350:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(*len)’ where non-null expected
util-linux-2.43.devel/misc-utils/wipefs.c:44: included_from: Included from here.
util-linux-2.43.devel/misc-utils/wipefs.c:23: included_from: Included from here.
util-linux-2.43.devel/misc-utils/wipefs.c:37: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h:18: included_from: Included from here.
util-linux-2.43.devel/misc-utils/wipefs.c:29: included_from: Included from here.
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  348|   
#  349|   	wp->magic = xmalloc(*len);
#  350|-> 	memcpy(wp->magic, mag, *len);
#  351|   	wp->len = *len;
#  352|   

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/blkpr.c: scope_hint: In function ‘do_pr’
util-linux-2.43.devel/sys-utils/blkpr.c:272:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 2)’
#  270|   		err(EXIT_FAILURE, _("cannot open %s"), path);
#  271|   
#  272|-> 	switch (op) {
#  273|   	case IOC_PR_REGISTER:
#  274|   		pr_reg.old_key = oldkey;

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/sys-utils/hwclock-parse-date.c: scope_hint: In function ‘yyparse’
util-linux-2.43.devel/sys-utils/hwclock-parse-date.c:1576:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(__time_t *)<unknown>’
util-linux-2.43.devel/sys-utils/hwclock-parse-date.y: scope_hint: In function ‘yyparse’
# 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):
util-linux-2.43.devel/sys-utils/irq-common.c: scope_hint: In function ‘get_scols_table’
util-linux-2.43.devel/sys-utils/irq-common.c:551:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(size)’ where non-null expected
util-linux-2.43.devel/sys-utils/irq-common.c: scope_hint: In function ‘get_scols_table’
util-linux-2.43.devel/sys-utils/irq-common.c:21: included_from: Included from here.
/usr/include/string.h:47:14: note: argument 1 of ‘memcpy’ must be non-null
#  549|   	size = sizeof(*stat->irq_info) * stat->nr_irq;
#  550|   	result = xmalloc(size);
#  551|-> 	memcpy(result, stat->irq_info, size);
#  552|   
#  553|   	if (prev) {

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/ldattach.c: scope_hint: In function ‘main’
util-linux-2.43.devel/sys-utils/ldattach.c:398:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 258)’
#  396|   	if ((tty_fd = open(dev, O_RDWR | O_NOCTTY)) < 0)
#  397|   		err(EXIT_FAILURE, _("cannot open %s"), dev);
#  398|-> 	if (!isatty(tty_fd))
#  399|   		errx(EXIT_FAILURE, _("%s is not a serial line"), dev);
#  400|   

Error: CPPCHECK_WARNING (CWE-476):
util-linux-2.43.devel/sys-utils/lscpu-arm.c:562: warning[nullPointer]: Possible null pointer dereference: parts
#  560|   	tb = arm_mktable(cxt, "arm-models");
#  561|   
#  562|-> 	for (i = 0; parts[i].id != -1; i++) {
#  563|   		struct libscols_line *ln;
#  564|   		ln = scols_table_new_line(tb, NULL);

Error: CPPCHECK_WARNING (CWE-476):
util-linux-2.43.devel/sys-utils/lscpu-arm.c:592: warning[nullPointer]: Possible null pointer dereference: parts
#  590|   		errx(EXIT_FAILURE, _("implementer not found"));
#  591|   
#  592|-> 	for (i = 0; parts[i].id != -1; i++) {
#  593|   		if (parts[i].id == model) {
#  594|   			printf("%s\n", parts[i].name);

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/sys-utils/lscpu-cpu.c: scope_hint: In function ‘lscpu_create_cpus’
util-linux-2.43.devel/sys-utils/lscpu-cpu.c:68:40: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*cxt.cpus’
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.h:17: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu-cpu.c:11: included_from: Included from here.
/usr/include/sched.h:44: included_from: Included from here.
util-linux-2.43.devel/include/cpuset.h:10: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.h:19: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.h:20: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.h:26: included_from: Included from here.
util-linux-2.43.devel/sys-utils/lscpu.h:37:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.43.devel/sys-utils/lscpu-cpu.c:27:9: note: in expansion of macro ‘DBG’
#   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):
util-linux-2.43.devel/sys-utils/mount.c:898: error[legacyUninitvar]: Uninitialized variable: path
#  896|   				snprintf(path, sizeof(path), "/proc/%i/ns/mnt", pid);
#  897|   
#  898|-> 			if (mnt_context_set_target_ns(cxt, pid ? path : optarg))
#  899|   				err(MNT_EX_SYSERR, _("failed to set target namespace to %s"), pid ? path : optarg);
#  900|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/nsenter.c: scope_hint: In function ‘open_target_fd’
util-linux-2.43.devel/sys-utils/nsenter.c:182:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*((struct namespace_file (*)[9])n)[preserve_cred].fd’
util-linux-2.43.devel/sys-utils/nsenter.c:46: included_from: Included from here.
util-linux-2.43.devel/sys-utils/nsenter.c:281:41: note: in expansion of macro ‘get_nsfile’
util-linux-2.43.devel/sys-utils/nsenter.c: scope_hint: In function ‘open_target_fd’
#  180|   	if (*fd < 0)
#  181|   		err(EXIT_FAILURE, _("cannot open %s"), path);
#  182|-> }
#  183|   
#  184|   #ifdef USE_NAMESPACE_ID_SUPPORT

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/readprofile.c:231:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&defaultpro, 1)’
#  229|   		if (fd < 0)
#  230|   			err(EXIT_FAILURE, "%s", defaultpro);
#  231|-> 		if (write(fd, &multiplier, to_write) != to_write)
#  232|   			err(EXIT_FAILURE, _("error writing %s"), defaultpro);
#  233|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/sys-utils/readprofile.c:278:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(len)’
#  276|   	}
#  277|   
#  278|-> 	step = buf[0];
#  279|   	if (optInfo) {
#  280|   		printf(_("Sampling_step: %u\n"), step);

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/setpgid.c: scope_hint: In function ‘main’
util-linux-2.43.devel/sys-utils/setpgid.c:76:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
#   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):
util-linux-2.43.devel/sys-utils/setpgid.c:78:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
#   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):
util-linux-2.43.devel/sys-utils/setpgid.c:80:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 524288)’
#   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):
util-linux-2.43.devel/sys-utils/setpriv.c: scope_hint: In function ‘do_selinux_label’
util-linux-2.43.devel/sys-utils/setpriv.c:654:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/attr/exec", 2)’
#  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):
util-linux-2.43.devel/sys-utils/setpriv.c: scope_hint: In function ‘do_seccomp_filter’
util-linux-2.43.devel/sys-utils/setpriv.c:704:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
#  702|   
#  703|   	s = read_all_alloc(fd, &filter);
#  704|-> 	if (s < 0)
#  705|   		err(SETPRIV_EXIT_PRIVERR,
#  706|   		    _("cannot read %s"), file);

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/sys-utils/swapoff.c: scope_hint: In function ‘resolve_swapfile_tag’
util-linux-2.43.devel/sys-utils/swapoff.c:89:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘path’
#   87|   
#   88|   		blkid_free_probe(pr);
#   89|-> 		if (path)
#   90|   			break;
#   91|   	}

Error: CPPCHECK_WARNING (CWE-457):
util-linux-2.43.devel/sys-utils/swapoff.c:94: warning[uninitvar]: Uninitialized variable: path
#   92|   
#   93|   	mnt_free_iter(itr);
#   94|-> 	return path;
#   95|   }
#   96|   

Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.43.devel/sys-utils/swapoff.c:95:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<return-value>’
#   93|   	mnt_free_iter(itr);
#   94|   	return path;
#   95|-> }
#   96|   
#   97|   static int do_swapoff(const char *orig_special, int quiet, int canonic)

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

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/sys-utils/unshare.c: scope_hint: In function ‘setgroups_control.part.0’
util-linux-2.43.devel/sys-utils/unshare.c:120:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/setgroups", 1)’
#  118|   	}
#  119|   
#  120|-> 	if (write_all(fd, cmd, strlen(cmd)))
#  121|   		err(EXIT_FAILURE, _("write failed %s"), file);
#  122|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c: scope_hint: In function ‘issuefile_read_stream.part.0’
util-linux-2.43.devel/term-utils/agetty.c:1795:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.43.devel/term-utils/agetty.c:14: included_from: Included from here.
/usr/include/stdio.h:616:12: note: argument 2 of ‘putc’ must be non-null
# 1793|   			output_special_char(ie, fgetc(f), op, tp, f);
# 1794|   		else
# 1795|-> 			putc(c, ie->output);
# 1796|   	}
# 1797|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c: scope_hint: In function ‘dump_iface_all’
util-linux-2.43.devel/term-utils/agetty.c:2735:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.43.devel/include/netlink.h:28: included_from: Included from here.
util-linux-2.43.devel/include/netaddrq.h:17: included_from: Included from here.
util-linux-2.43.devel/term-utils/agetty.c:51: included_from: Included from here.
util-linux-2.43.devel/include/netaddrq.h:62:46: note: in expansion of macro ‘list_for_each’
util-linux-2.43.devel/term-utils/agetty.c:2987:17: note: in expansion of macro ‘list_for_each_netaddrq_iface’
/usr/include/stdio.h:364:12: note: argument 1 of ‘fprintf’ must be non-null
# 2733|   		if (first)
# 2734|   		{
# 2735|-> 			fprintf(ie->output, "%s: ", ifaceq->ifname);
# 2736|   			first = false;
# 2737|   		}

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c:2747:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.43.devel/include/netaddrq.h:62:46: note: in expansion of macro ‘list_for_each’
util-linux-2.43.devel/term-utils/agetty.c:2987:17: note: in expansion of macro ‘list_for_each_netaddrq_iface’
util-linux-2.43.devel/term-utils/agetty.c:2730:9: note: in expansion of macro ‘list_for_each’
util-linux-2.43.devel/term-utils/agetty.c:2742:9: note: in expansion of macro ‘list_for_each’
/usr/include/stdio.h:364:12: note: argument 1 of ‘fprintf’ must be non-null
# 2745|   		if (first)
# 2746|   		{
# 2747|-> 			fprintf(ie->output, "%s: ", ifaceq->ifname);
# 2748|   			first = false;
# 2749|   		}

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c: scope_hint: In function ‘output_special_char’
util-linux-2.43.devel/term-utils/agetty.c:2806:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_fputc’ must be non-null
# 2804|   			}
# 2805|   		} else
# 2806|-> 			fputs("\033", ie->output);
# 2807|   		break;
# 2808|   	}

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c:2881:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_fputs’ must be non-null
# 2879|   	}
# 2880|   	case 'l':
# 2881|-> 		fprintf (ie->output, "%s", op->tty);
# 2882|   		break;
# 2883|   	case 'b':

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/agetty.c:2997:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
/usr/include/stdio.h:616:12: note: argument 2 of ‘putc’ must be non-null
# 2995|   #endif
# 2996|   	default:
# 2997|-> 		putc(c, ie->output);
# 2998|   		break;
# 2999|   	}

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/term-utils/setterm.c:729:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_snapshot_device(ctl)’
#  727|   	int fd;
#  728|   
#  729|-> 	if (ctl->opt_sn_num)
#  730|   		xasprintf(&ctl->in_device, "/dev/vcsa%d", ctl->opt_sn_num);
#  731|   	else

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/term-utils/setterm.c:790:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ctl.opt_sn_name,  <unknown>)’
#  788|   		err(EXIT_DUMPFILE, _("cannot open dump file %s for output"), ctl->opt_sn_name);
#  789|   	/* determine snapshot size */
#  790|-> 	if (read(fd, header, 4) != 4)
#  791|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  792|   	rows = header[0];

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/term-utils/setterm.c:790:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ctl.opt_sn_name,  <unknown>)’
#  788|   		err(EXIT_DUMPFILE, _("cannot open dump file %s for output"), ctl->opt_sn_name);
#  789|   	/* determine snapshot size */
#  790|-> 	if (read(fd, header, 4) != 4)
#  791|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  792|   	rows = header[0];

Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.43.devel/term-utils/setterm.c:792:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ctl.opt_sn_name,  <unknown>)’
#  790|   	if (read(fd, header, 4) != 4)
#  791|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  792|-> 	rows = header[0];
#  793|   	cols = header[1];
#  794|   	if (rows * cols == 0)

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/term-utils/setterm.c:792:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ctl.opt_sn_name,  <unknown>)’
#  790|   	if (read(fd, header, 4) != 4)
#  791|   		err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
#  792|-> 	rows = header[0];
#  793|   	cols = header[1];
#  794|   	if (rows * cols == 0)

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/term-utils/setterm.c:808:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
#  806|   	for (i = 0; i < rows; i++) {
#  807|   		for (j = 0; j < cols; j++) {
#  808|-> 			*q++ = *p;
#  809|   			p += 2;
#  810|   		}

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/term-utils/setterm.c:808:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
#  806|   	for (i = 0; i < rows; i++) {
#  807|   		for (j = 0; j < cols; j++) {
#  808|-> 			*q++ = *p;
#  809|   			p += 2;
#  810|   		}

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/term-utils/setterm.c:813:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
#  811|   		while (j-- > 0 && q[-1] == ' ')
#  812|   			q--;
#  813|-> 		*q++ = '\n';
#  814|   	}
#  815|   	fwrite(outbuf, 1, q - outbuf, out);

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/term-utils/wall.c: scope_hint: In function ‘makemsg’
util-linux-2.43.devel/term-utils/wall.c:382:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fs’ where non-null expected
util-linux-2.43.devel/term-utils/wall.c:54: included_from: Included from here.
/usr/include/stdio.h:364:12: note: argument 1 of ‘fprintf’ must be non-null
#  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):
util-linux-2.43.devel/term-utils/wall.c:391:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fs’ where non-null expected
/usr/include/stdio.h:364:12: note: argument 1 of ‘fprintf’ must be non-null
#  389|   		free(whombuf);
#  390|   	}
#  391|-> 	fprintf(fs, "%*s\r\n", TERM_WIDTH, " ");
#  392|   
#  393|   	 if (mvec) {

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/text-utils/bits.c: scope_hint: In function ‘main’
util-linux-2.43.devel/text-utils/bits.c:321:17: warning[-Wanalyzer-null-dereference]: 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):
util-linux-2.43.devel/text-utils/hexdump-parse.c:607:1: warning[-Wanalyzer-malloc-leak]: leak of ‘hcnext’
#  605|   	}
#  606|   	return ret_head;
#  607|-> }
#  608|   
#  609|   static void escape(char *p1)

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/text-utils/more.c: scope_hint: In function ‘argscan’
util-linux-2.43.devel/text-utils/more.c:293:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘as_argv’
util-linux-2.43.devel/text-utils/more.c:88: included_from: Included from here.
util-linux-2.43.devel/include/c.h:23: included_from: Included from here.
util-linux-2.43.devel/include/strutils.h:19: included_from: Included from here.
util-linux-2.43.devel/text-utils/more.c:86: included_from: Included from here.
#  291|   		int move = 0;
#  292|   
#  293|-> 		if (as_argv[opt][0] == '-' && isdigit_string(as_argv[opt] + 1)) {
#  294|   			ctl->lines_per_screen =
#  295|   			    strtos16_or_err(as_argv[opt], _("failed to parse number"));

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.43.devel/text-utils/more.c:316:21: warning[-Wanalyzer-null-argument]: use of NULL ‘as_argv’ where non-null expected
/usr/include/getopt.h:36: included_from: Included from here.
util-linux-2.43.devel/text-utils/more.c:68: included_from: Included from here.
/usr/include/bits/getopt_ext.h:66:12: note: argument 2 of ‘getopt_long’ must be non-null
#  314|   	}
#  315|   
#  316|-> 	while ((c = getopt_long(as_argc, as_argv, "dflcpsun:eVh", longopts, NULL)) != -1) {
#  317|   		switch (c) {
#  318|   		case 'd':

Error: CPPCHECK_WARNING (CWE-476):
util-linux-2.43.devel/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|   	}
