Task #40041 - fixed.err

back to task #40041
download
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c: scope_hint: In function ‘ui_create_label’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c:2183:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(fdisk_get_nlabels(*cf.cxt) + 1, 32) + i * 32’
util-linux-2.42.start-build/util-linux-2.42.start/include/debug.h:104:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c:274:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.42.start-build/util-linux-2.42.start/include/debug.h:104:17: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_STRING’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c:274:9: note: in expansion of macro ‘__UL_INIT_DEBUG_FROM_ENV’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c:270:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/cfdisk.c:2172:9: note: in expansion of macro ‘DBG’
# 2181|   		    fdisk_label_get_type(lb) == FDISK_DISKLABEL_BSD)
# 2182|   			continue;
# 2183|-> 		cm[i++].name = fdisk_label_get_name(lb);
# 2184|   	}
# 2185|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/mkfs.cramfs.c:305:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 257)’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  303|   	/* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */
#  304|   	path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1);
#  305|-> 	memcpy(path, name, len);
#  306|   	endpath = path + len;
#  307|   	*endpath = '/';

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c:36: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/include/all-io.h: scope_hint: In function ‘read_all’
util-linux-2.42.start-build/util-linux-2.42.start/include/all-io.h:67:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.h:18: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c:47: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c:35: included_from: Included from here.
<built-in>: note: argument 1 of ‘__builtin_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-476):
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/blkid.c:889:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8)’
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/blkid.c:41: included_from: Included from here.
#  887|   				continue;
#  888|   
#  889|-> 			devices[numdev++] = dev;
#  890|   		}
#  891|   

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/namei.c: scope_hint: In function ‘readlink_to_namei’
util-linux-2.42.start-build/util-linux-2.42.start/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.42.start-build/util-linux-2.42.start/misc-utils/namei.c:39: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/include/c.h:22: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/namei.c:38: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/namei.c:29: included_from: Included from here.
<built-in>: note: argument 1 of ‘__builtin_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.42.start-build/util-linux-2.42.start/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
<built-in>: note: argument 1 of ‘__builtin_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.42.start-build/util-linux-2.42.start/misc-utils/namei.c: scope_hint: In function ‘dotdot_stat’
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/namei.c:142:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 4)’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_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.42.start-build/util-linux-2.42.start/misc-utils/waitpid.c: scope_hint: In function ‘parse_pids’
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/waitpid.c:54:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_strings, 4) + i * 4’
util-linux-2.42.start-build/util-linux-2.42.start/include/strutils.h:53:64: note: in definition of macro ‘strtopid_or_err’
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/waitpid.c:54:55: note: in expansion of macro ‘_’
#   52|   
#   53|   	for (size_t i = 0; i < n_strings; i++)
#   54|-> 		pids[i] = strtopid_or_err(strings[i], _("failed to parse pid"));
#   55|   
#   56|   	return pids;

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/wipefs.c: scope_hint: In function ‘get_desc_for_probe’
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/wipefs.c:350:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(*len)’ where non-null expected
util-linux-2.42.start-build/util-linux-2.42.start/misc-utils/wipefs.c:38: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/include/c.h:22: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/include/xalloc.h:20: included_from: Included from here.
<built-in>: note: argument 1 of ‘__builtin_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-688):
util-linux-2.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c: scope_hint: In function ‘get_scols_table’
util-linux-2.42.start-build/util-linux-2.42.start/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.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c: scope_hint: In function ‘get_scols_table’
<built-in>: note: argument 1 of ‘__builtin_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) {