Task #89916 - fixed.err
back to task #89916download
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/include/xalloc.h: scope_hint: In function ‘new_filter’
util-linux-2.42.start/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(ct + 1, 8)’
util-linux-2.42.start/lsfd-cmd/lsfd.c:50: included_from: Included from here.
util-linux-2.42.start/lsfd-cmd/lsfd.c:2393:9: note: in expansion of macro ‘list_for_each’
# 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: COMPILER_WARNING:
util-linux-2.42.start/libsmartcols/src/filter-parser.c: scope_hint: In function 'yyparse'
util-linux-2.42.start/libsmartcols/src/filter-parser.c:1177:9: warning[-Wunused-but-set-variable=]: variable 'yynerrs' set but not used
# 1177 | int yynerrs = 0;
# | ^~~~~~~
# 1175|
# 1176| /* Number of syntax errors so far. */
# 1177|-> int yynerrs = 0;
# 1178|
# 1179| yy_state_fast_t yystate = 0;
Error: GCC_ANALYZER_WARNING (CWE-775):
util-linux-2.42.start/login-utils/setpwnam.c: scope_hint: In function ‘setpwnam’
util-linux-2.42.start/login-utils/setpwnam.c:101:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/passwd", "r")’
util-linux-2.42.start/login-utils/setpwnam.c:62: included_from: Included from here.
# 99| goto fail;
# 100|
# 101|-> namelen = strlen(pwd->pw_name);
# 102| if (namelen > buflen)
# 103| buflen += namelen;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/login-utils/setpwnam.c:101:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/passwd", "r")’
# 99| goto fail;
# 100|
# 101|-> namelen = strlen(pwd->pw_name);
# 102| if (namelen > buflen)
# 103| buflen += namelen;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/login-utils/setpwnam.c:136:29: warning[-Wanalyzer-malloc-leak]: leak of ‘linebuf’
# 134| /* Yes! But this time let’s not walk past the end of the buffer
# 135| * in the name of the Lord, SUID, or anything else. */
# 136|-> if (putpwent(pwd, fp) < 0)
# 137| goto fail;
# 138| found = 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start/misc-utils/cal.c: scope_hint: In function ‘monthly’
util-linux-2.42.start/misc-utils/cal.c:1099:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208) + (sizetype)i * 208’
util-linux-2.42.start/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.42.start/misc-utils/logger.c:1053:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(*ctl.max_message_size + 4) + i’
# 1051| c = getchar();
# 1052| }
# 1053|-> buf[i] = '\0';
# 1054|
# 1055| if (i > 0 || !ctl->skip_empty_lines) {
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start/misc-utils/waitpid.c: scope_hint: In function ‘parse_pids’
util-linux-2.42.start/misc-utils/waitpid.c:53:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_strings, 4)’
util-linux-2.42.start/include/strutils.h:55:64: note: in definition of macro ‘strtopid_or_err’
util-linux-2.42.start/misc-utils/waitpid.c:53:55: note: in expansion of macro ‘_’
# 51|
# 52| for (size_t i = 0; i < n_strings; i++)
# 53|-> pids[i] = strtopid_or_err(strings[i], _("invalid PID argument"));
# 54|
# 55| return pids;
Error: COMPILER_WARNING:
util-linux-2.42.start/sys-utils/hwclock-parse-date.c: scope_hint: In function ‘yyparse’
util-linux-2.42.start/sys-utils/hwclock-parse-date.c:1338:9: warning[-Wunused-but-set-variable=]: variable ‘yynerrs’ set but not used
# 1338 | int yynerrs = 0;
# | ^~~~~~~
# 1336|
# 1337| /* Number of syntax errors so far. */
# 1338|-> int yynerrs = 0;
# 1339|
# 1340| yy_state_fast_t yystate = 0;