Task #52619 - fixed.err

back to task #52619
download
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.40.4/misc-utils/cal.c:1016:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208) + (sizetype)i * 208’
util-linux-2.40.4/misc-utils/cal.c:1047:13: enter_function: entry to ‘yearly’
util-linux-2.40.4/misc-utils/cal.c:1061:9: call_function: calling ‘monthly’ from ‘yearly’
# 1014|   
# 1015|   	for (i = 0; i < ctl->months_in_row - 1; i++)
# 1016|-> 		ms[i].next = &ms[i + 1];
# 1017|   
# 1018|   	rows = (ctl->num_months - 1) / ctl->months_in_row;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.40.4/misc-utils/hardlink.c:515:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)n * 8) + (long unsigned int)i * 8’
util-linux-2.40.4/misc-utils/hardlink.c:1048:13: enter_function: entry to ‘visitor’
util-linux-2.40.4/misc-utils/hardlink.c:1056:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1059:16: branch_true: following ‘true’ branch (when ‘master’ is non-NULL)...
util-linux-2.40.4/misc-utils/hardlink.c:1063:21: branch_true: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1063:20: branch_false: following ‘false’ branch...
util-linux-2.40.4/misc-utils/hardlink.c:1065:21: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1065:20: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1069:26: call_function: inlined call to ‘count_nodes’ from ‘visitor’
util-linux-2.40.4/misc-utils/hardlink.c:1070:20: branch_false: following ‘false’ branch (when ‘ct != 0’)...
util-linux-2.40.4/misc-utils/hardlink.c:1074:26: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1086:44: branch_true: following ‘true’ branch (when ‘other’ is non-NULL)...
util-linux-2.40.4/misc-utils/hardlink.c:1089:29: branch_true: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1089:28: branch_false: following ‘false’ branch...
util-linux-2.40.4/misc-utils/hardlink.c:1092:25: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1092:25: branch_true: following ‘true’ branch...
util-linux-2.40.4/misc-utils/hardlink.c:1093:25: branch_true: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1093:25: branch_true: following ‘true’ branch...
util-linux-2.40.4/misc-utils/hardlink.c:1095:30: branch_true: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1095:28: branch_false: following ‘false’ branch...
util-linux-2.40.4/misc-utils/hardlink.c:1099:30: branch_false: ...to here
util-linux-2.40.4/misc-utils/hardlink.c:1099:30: call_function: calling ‘file_may_link_to’ from ‘visitor’
#  513|   
#  514|   	for (i = 0; i < n; i++) {
#  515|-> 		table[i] = names;
#  516|   		names += strlen(names) + 1;
#  517|   	}

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