Task #93229 - added.err
back to task #93229download
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start/disk-utils/cfdisk.c: scope_hint: In function ‘ui_create_label’
util-linux-2.42.start/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.42.start/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.42.start/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: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/disk-utils/cfdisk.c:2182:32: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(fdisk_get_nlabels(*cf.cxt) + 1, 32) + i * 32’
util-linux-2.42.start/disk-utils/cfdisk.c:267:25: note: in expansion of macro ‘__UL_DBG’
util-linux-2.42.start/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: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/include/xalloc.h:33:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 31|
# 32| if (!ret && size)
# 33|-> err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
# 34| return ret;
# 35| }
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:34: included_from: Included from here.
util-linux-2.42.start/include/xalloc.h: scope_hint: In function ‘xmalloc’
util-linux-2.42.start/include/xalloc.h:33:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
util-linux-2.42.start/include/c.h:23: included_from: Included from here.
util-linux-2.42.start/misc-utils/copyfilerange.c:31: included_from: Included from here.
# 31|
# 32| if (!ret && size)
# 33|-> err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
# 34| return ret;
# 35| }
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/include/xalloc.h:95:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 93| ret = strdup(str);
# 94| if (!ret)
# 95|-> err(XALLOC_EXIT_CODE, "cannot duplicate string");
# 96| return ret;
# 97| }
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/include/xalloc.h:95:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 93| ret = strdup(str);
# 94| if (!ret)
# 95|-> err(XALLOC_EXIT_CODE, "cannot duplicate string");
# 96| return ret;
# 97| }
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/include/xalloc.h: scope_hint: In function ‘xstrdup’
util-linux-2.42.start/include/xalloc.h:95:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range_files’
# 93| ret = strdup(str);
# 94| if (!ret)
# 95|-> err(XALLOC_EXIT_CODE, "cannot duplicate string");
# 96| return ret;
# 97| }
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/lsfd-cmd/lsfd.c: scope_hint: In function ‘new_filter’
util-linux-2.42.start/lsfd-cmd/lsfd.c:2394:28: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(17, 8) + i * 8’
# 2392| struct libscols_counter *ct;
# 2393|
# 2394|-> f = new_filter(spec->expr, false, ctl);
# 2395|
# 2396| ct = scols_filter_new_counter(f);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:154:34: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 152| fprintf(stderr, "copy_file_range %s to %s %"PRId64":%"PRId64":%li\n", range->in_filename, range->out_filename, range->in_offset, range->out_offset, chunk);
# 153| }
# 154|-> ssize_t copied = copy_file_range(range->in_fd, &range->in_offset, range->out_fd, &range->out_offset, chunk, 0);
# 155| if (copied < 0) {
# 156| fprintf(stderr, _("failed copy file range %"PRId64":%"PRId64":%li from %s to %s with remaining %li: %m\n"), range->in_offset, range->out_offset, len, range->in_filename, range->out_filename, remaining);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c: scope_hint: In function ‘copy_range’
util-linux-2.42.start/misc-utils/copyfilerange.c:154:34: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
/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.42.start/misc-utils/copyfilerange.c:20: included_from: Included from here.
# 152| fprintf(stderr, "copy_file_range %s to %s %"PRId64":%"PRId64":%li\n", range->in_filename, range->out_filename, range->in_offset, range->out_offset, chunk);
# 153| }
# 154|-> ssize_t copied = copy_file_range(range->in_fd, &range->in_offset, range->out_fd, &range->out_offset, chunk, 0);
# 155| if (copied < 0) {
# 156| fprintf(stderr, _("failed copy file range %"PRId64":%"PRId64":%li from %s to %s with remaining %li: %m\n"), range->in_offset, range->out_offset, len, range->in_filename, range->out_filename, remaining);
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.start/misc-utils/copyfilerange.c: scope_hint: In function ‘main’
util-linux-2.42.start/misc-utils/copyfilerange.c:214:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘range_files’
# 212| if (!range_files)
# 213| range_files = xmalloc(sizeof(char *) * argc);
# 214|-> range_files[nrange_files++] = xstrdup(optarg);
# 215| break;
# 216| case 's':
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:218:33: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
util-linux-2.42.start/include/nls.h:27: included_from: Included from here.
util-linux-2.42.start/misc-utils/copyfilerange.c:32: included_from: Included from here.
util-linux-2.42.start/misc-utils/copyfilerange.c:218:52: note: in expansion of macro ‘_’
# 216| case 's':
# 217| if (range.in_filename)
# 218|-> errx(EXIT_FAILURE, _("only one source file is allowed (%s already supplied)"), range.in_filename);
# 219| range.in_filename = xstrdup(optarg);
# 220| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:218:33: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
util-linux-2.42.start/misc-utils/copyfilerange.c:218:52: note: in expansion of macro ‘_’
# 216| case 's':
# 217| if (range.in_filename)
# 218|-> errx(EXIT_FAILURE, _("only one source file is allowed (%s already supplied)"), range.in_filename);
# 219| range.in_filename = xstrdup(optarg);
# 220| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:223:33: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
util-linux-2.42.start/misc-utils/copyfilerange.c:223:52: note: in expansion of macro ‘_’
# 221| case 'd':
# 222| if (range.out_filename)
# 223|-> errx(EXIT_FAILURE, _("only one destination file is allowed (%s already supplied)"), range.out_filename);
# 224| range.out_filename = xstrdup(optarg);
# 225| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:223:33: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
util-linux-2.42.start/misc-utils/copyfilerange.c:223:52: note: in expansion of macro ‘_’
# 221| case 'd':
# 222| if (range.out_filename)
# 223|-> errx(EXIT_FAILURE, _("only one destination file is allowed (%s already supplied)"), range.out_filename);
# 224| range.out_filename = xstrdup(optarg);
# 225| break;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.42.start/misc-utils/copyfilerange.c:246:36: note: in expansion of macro ‘_’
# 244|
# 245| if (!range.in_filename)
# 246|-> errx(EXIT_FAILURE, _("source file is required"));
# 247|
# 248| if (!range.out_filename)
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
util-linux-2.42.start/misc-utils/copyfilerange.c:246:36: note: in expansion of macro ‘_’
# 244|
# 245| if (!range.in_filename)
# 246|-> errx(EXIT_FAILURE, _("source file is required"));
# 247|
# 248| if (!range.out_filename)
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:246:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range_files’
util-linux-2.42.start/misc-utils/copyfilerange.c:246:36: note: in expansion of macro ‘_’
# 244|
# 245| if (!range.in_filename)
# 246|-> errx(EXIT_FAILURE, _("source file is required"));
# 247|
# 248| if (!range.out_filename)
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.42.start/misc-utils/copyfilerange.c:249:36: note: in expansion of macro ‘_’
# 247|
# 248| if (!range.out_filename)
# 249|-> errx(EXIT_FAILURE, _("destination file is required"));
# 250|
# 251| range.in_fd = open(range.in_filename, O_RDONLY);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
util-linux-2.42.start/misc-utils/copyfilerange.c:249:36: note: in expansion of macro ‘_’
# 247|
# 248| if (!range.out_filename)
# 249|-> errx(EXIT_FAILURE, _("destination file is required"));
# 250|
# 251| range.in_fd = open(range.in_filename, O_RDONLY);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range_files’
util-linux-2.42.start/misc-utils/copyfilerange.c:249:36: note: in expansion of macro ‘_’
# 247|
# 248| if (!range.out_filename)
# 249|-> errx(EXIT_FAILURE, _("destination file is required"));
# 250|
# 251| range.in_fd = open(range.in_filename, O_RDONLY);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:251:23: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 249| errx(EXIT_FAILURE, _("destination file is required"));
# 250|
# 251|-> range.in_fd = open(range.in_filename, O_RDONLY);
# 252| if (range.in_fd < 0)
# 253| err(EXIT_FAILURE, _("cannot open source %s"), range.in_filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:251:23: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 249| errx(EXIT_FAILURE, _("destination file is required"));
# 250|
# 251|-> range.in_fd = open(range.in_filename, O_RDONLY);
# 252| if (range.in_fd < 0)
# 253| err(EXIT_FAILURE, _("cannot open source %s"), range.in_filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:253:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 251| range.in_fd = open(range.in_filename, O_RDONLY);
# 252| if (range.in_fd < 0)
# 253|-> err(EXIT_FAILURE, _("cannot open source %s"), range.in_filename);
# 254|
# 255|
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:253:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 251| range.in_fd = open(range.in_filename, O_RDONLY);
# 252| if (range.in_fd < 0)
# 253|-> err(EXIT_FAILURE, _("cannot open source %s"), range.in_filename);
# 254|
# 255|
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:257:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 255|
# 256| if (fstat(range.in_fd, &sb) == -1)
# 257|-> err(EXIT_FAILURE, _("cannot determine size of source file %s"), range.in_filename);
# 258| range.in_st_size = sb.st_size;
# 259|
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:257:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 255|
# 256| if (fstat(range.in_fd, &sb) == -1)
# 257|-> err(EXIT_FAILURE, _("cannot determine size of source file %s"), range.in_filename);
# 258| range.in_st_size = sb.st_size;
# 259|
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:260:24: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 258| range.in_st_size = sb.st_size;
# 259|
# 260|-> range.out_fd = open(range.out_filename, O_WRONLY | O_CREAT, 0666);
# 261| if (range.out_fd < 0)
# 262| err(EXIT_FAILURE, _("cannot open destination %s"), argv[2]);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:260:24: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 258| range.in_st_size = sb.st_size;
# 259|
# 260|-> range.out_fd = open(range.out_filename, O_WRONLY | O_CREAT, 0666);
# 261| if (range.out_fd < 0)
# 262| err(EXIT_FAILURE, _("cannot open destination %s"), argv[2]);
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:262:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.in_filename’
# 260| range.out_fd = open(range.out_filename, O_WRONLY | O_CREAT, 0666);
# 261| if (range.out_fd < 0)
# 262|-> err(EXIT_FAILURE, _("cannot open destination %s"), argv[2]);
# 263|
# 264| for (size_t i = 0; i < nrange_files; i++) {
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.start/misc-utils/copyfilerange.c:262:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range.out_filename’
# 260| range.out_fd = open(range.out_filename, O_WRONLY | O_CREAT, 0666);
# 261| if (range.out_fd < 0)
# 262|-> err(EXIT_FAILURE, _("cannot open destination %s"), argv[2]);
# 263|
# 264| for (size_t i = 0; i < nrange_files; i++) {
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) + i * 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;