Task #40041 - added.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)’
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-476):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdformat.c: scope_hint: In function ‘verify_disk’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdformat.c:127:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)track_size) + (sizetype)count’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdformat.c:20: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdformat.c:28: included_from: Included from here.
#  125|   				}
#  126|   				for (count = 0; count < track_size; count++)
#  127|-> 					if (data[count] != FD_FILL_BYTE) {
#  128|   						if (retries_left) {
#  129|   							format_begin(ctrl);

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c: scope_hint: In function ‘skip_empty’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c:957:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p0’ 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.
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/disk-utils/fdisk.c:17: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 1 of ‘memcmp’ must be non-null
#  955|   
#  956|   	for (next = i + 16; next < sz; next += 16) {
#  957|-> 		if (memcmp(p0, buf + next, 16) != 0)
#  958|   			break;
#  959|   	}

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c: scope_hint: In function ‘dump_buffer’
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/fdisk.c:976:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
#  974|   			printf("%08jx ", (intmax_t)base + i);
#  975|   		}
#  976|-> 		printf(" %02x", buf[i]);
#  977|   		if (l == 7)				/* words separator */
#  978|   			fputs(" ", stdout);

Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/mkfs.cramfs.c:343:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 257)’ where non-null expected
/usr/include/features.h:524: included_from: Included from here.
/usr/include/sys/types.h:25: included_from: Included from here.
util-linux-2.42.start-build/util-linux-2.42.start/disk-utils/mkfs.cramfs.c:28: included_from: Included from here.
/usr/include/sys/stat.h:327:12: note: argument 1 of ‘lstat’ must be non-null
#  341|   		memcpy(endpath, dirent->d_name, namelen + 1);
#  342|   
#  343|-> 		if (lstat(path, &st) < 0) {
#  344|   			warn(_("stat of %s failed"), endpath);
#  345|   			warn_skip = 1;

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:145:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xmalloc(len + 4)’ 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.
/usr/include/features.h:524: 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.42.start-build/util-linux-2.42.start/misc-utils/namei.c:22: included_from: Included from here.
/usr/include/sys/stat.h:227:12: note: argument 1 of ‘stat’ must be non-null
#  143|   	memcpy(path + len, DOTDOTDIR, sizeof(DOTDOTDIR));
#  144|   
#  145|-> 	if (stat(path, st))
#  146|   		err(EXIT_FAILURE, _("stat of %s failed"), path);
#  147|   	free(path);

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)’
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/sys-utils/irq-common.c: scope_hint: In function ‘sort_result’
util-linux-2.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c:404:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected
util-linux-2.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c: scope_hint: In function ‘sort_result’
util-linux-2.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c:20: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
#  402|   		func = out->sort_cmp_func;
#  403|   
#  404|-> 	qsort(result, nmemb, sizeof(*result),
#  405|   			(int (*)(const void *, const void *)) func);
#  406|   }

Error: GCC_ANALYZER_WARNING (CWE-476):
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:559:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘cur’
util-linux-2.42.start-build/util-linux-2.42.start/sys-utils/irq-common.c: scope_hint: In function ‘get_scols_table’
#  557|   			struct irq_info *pre = &prev->irq_info[i];
#  558|   
#  559|-> 			cur->delta = cur->total - pre->total;
#  560|   			stat->delta_irq += cur->delta;
#  561|   		}