device-mapper-multipath-0.9.7-7.fc40
List of Defects
Error: CPPCHECK_WARNING: [#def1]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/bsd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/dasd.c: scope_hint: In function ‘read_dasd_pt’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/dasd.c:89:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_dasd’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/dasd.c:32: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/dasd.c: scope_hint: In function ‘read_dasd_pt’
# 87|
# 88| if (fd < 0) {
# 89|-> return -1;
# 90| }
# 91|
Error: CPPCHECK_WARNING: [#def3]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/gpt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def5]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:270:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
# 268| exit(1);
# 269|
# 270|-> diskdevice = device;
# 271| what = ADD;
# 272| } else if (argc < 2) {
Error: CLANG_WARNING: [#def6]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:336:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
# 334| } else if (optind == argc-2) {
# 335| device = argv[optind];
# 336|-> diskdevice = argv[optind+1];
# 337| } else if (optind == argc-1) {
# 338| diskdevice = device = argv[optind];
Error: CLANG_WARNING: [#def7]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:338:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
# 336| diskdevice = argv[optind+1];
# 337| } else if (optind == argc-1) {
# 338|-> diskdevice = device = argv[optind];
# 339| } else {
# 340| usage();
Error: CLANG_WARNING: [#def8]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:371:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'diskdevice'
# 369| device = loopdev;
# 370|
# 371|-> if (stat(device, &buf)) {
# 372| printf("failed to stat() %s\n", device);
# 373| exit (1);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:417:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:31: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:32: included_from: Included from here.
# 415| int r = 0;
# 416|
# 417|-> if (what == DELETE) {
# 418| r = dm_remove_partmaps(mapname, uuid, buf.st_rdev,
# 419| verbose);
Error: CLANG_WARNING: [#def10]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:665:6: warning[unix.Malloc]: Potential leak of memory pointed to by 'delim'
# 663| break;
# 664| }
# 665|-> if (fd != -1)
# 666| close(fd);
# 667| if (what == LIST && loopcreated) {
Error: CLANG_WARNING: [#def11]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:692:2: warning[deadcode.DeadStores]: Value stored to 'out' is never read
# 690| off64_t in, out;
# 691| in = ((off64_t) secnr * secsz);
# 692|-> out = 1;
# 693|
# 694| if ((out = lseek64(fd, in, SEEK_SET)) != in)
Error: CLANG_WARNING: [#def12]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/kpartx.c:694:7: warning[deadcode.DeadStores]: Although the value stored to 'out' is used in the enclosing expression, the value is never actually read from 'out'
# 692| out = 1;
# 693|
# 694|-> if ((out = lseek64(fd, in, SEEK_SET)) != in)
# 695| {
# 696| fprintf(stderr, "llseek error\n");
Error: CPPCHECK_WARNING: [#def13]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/lopart.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def14]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/solaris.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def15]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/kpartx/unixware.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def16]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libdmmp/libdmmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def17]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathcmd/mpath_cmd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def18]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathpersist/mpath_persist_int.c:417:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 415| /* Free attribute and wait for the other threads */
# 416| pthread_attr_destroy(&attr);
# 417|-> rc = pthread_join(thread, NULL);
# 418|
# 419| return (param.status);
Error: CLANG_WARNING: [#def19]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathpersist/mpath_persist_int.c:616:4: warning[deadcode.DeadStores]: Value stored to 'status' is never read
# 614| &pr_buff->prin_descriptor.prin_readfd.descriptors[i]->trnptid,
# 615| sizeof (struct transportid));
# 616|-> status = mpath_prout_common (mpp, MPATH_PROUT_REG_SA, 0, rq_type,
# 617| pamp, noisy);
# 618|
Error: CLANG_WARNING: [#def20]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathpersist/mpath_pr_ioctl.c:303:14: warning[deadcode.DeadStores]: Although the value stored to 'jump' is used in the enclosing expression, the value is never actually read from 'jump'
# 301| unsigned int num;
# 302| int jump, k;
# 303|-> for (k = 0, jump = 24; k < length; k += jump, p += jump) {
# 304| fdesc->trnptid.format_code = ((p[0] >> 6) & 0x3);
# 305| fdesc->trnptid.protocol_id = (p[0] & 0xf);
Error: CPPCHECK_WARNING: [#def21]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/msort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c: scope_hint: In function ‘find_keyword’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:139:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:23: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
# 137| for (i = 0; i < VECTOR_SIZE(v); i++) {
# 138| keyword = VECTOR_SLOT(v, i);
# 139|-> if ((strlen(keyword->string) == len) &&
# 140| !strcmp(keyword->string, name))
# 141| return keyword;
Error: CPPCHECK_WARNING: [#def23]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/uxsock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-122): [#def24]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.c: scope_hint: In function ‘vector_insert_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.c:86:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
# └─────────────────┘
# ^
# 84|
# 85| for (i = VECTOR_SIZE(v) - 2; i >= slot; i--)
# 86|-> v->slot[i + 1] = v->slot[i];
# 87|
# 88| v->slot[slot] = value;
Error: GCC_ANALYZER_WARNING (CWE-122): [#def25]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.c: scope_hint: In function ‘vector_del_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.c:128:28: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
# 126| void *new_slot;
# 127|
# 128|-> new_slot = realloc(v->slot, sizeof (void *) * v->allocated);
# 129| if (!new_slot)
# 130| v->allocated += VECTOR_DEFAULT_SIZE;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c: scope_hint: In function ‘add_binding’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:201:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bdg’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:15: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:698:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:20: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
# 199| /* Check for exact match */
# 200| if (i >= 0 && cmp == 0)
# 201|-> return strcmp(bdg->wwid, wwid) ?
# 202| BINDING_CONFLICT : BINDING_EXISTS;
# 203|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:201:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bdg’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
# 199| /* Check for exact match */
# 200| if (i >= 0 && cmp == 0)
# 201|-> return strcmp(bdg->wwid, wwid) ?
# 202| BINDING_CONFLICT : BINDING_EXISTS;
# 203|
Error: CLANG_WARNING: [#def28]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/alias.c:726:10: warning[deadcode.DeadStores]: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
# 724| }
# 725| pthread_cleanup_push(cleanup_free_ptr, &line);
# 726|-> while ((n = getline(&line, &line_len, file)) >= 0) {
# 727| char *alias, *wwid;
# 728| const char *mpe_wwid;
Error: CPPCHECK_WARNING: [#def29]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def30]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers/directio.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def31]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers/emc_clariion.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def32]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers/hp_sw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def33]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers/tur.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def34]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/discovery.c:1294:2: warning[deadcode.DeadStores]: Value stored to 'len' is never read
# 1292| __func__, d - in, in_len);
# 1293|
# 1294|-> len = 0;
# 1295| vpd_type = vpd[1] & 0xf;
# 1296| vpd_len = vpd[3];
Error: CLANG_WARNING: [#def35]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/discovery.c:2119:2: warning[deadcode.DeadStores]: Value stored to 'p' is never read
# 2117| return 0;
# 2118|
# 2119|-> p = skip_zeroes_backward(mangled, &len, p);
# 2120| if (len >= size)
# 2121| return 0;
Error: GCC_ANALYZER_WARNING (CWE-465): [#def36]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘merge_words’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:31:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
# 29| *dst = realloc(*dst, len);
# 30|
# 31|-> if (!*dst) {
# 32| free(p);
# 33| return 1;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:426:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:12: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
# 424| switch (*word) {
# 425| case 'D':
# 426|-> pgp->status = PGSTATE_DISABLED;
# 427| break;
# 428| case 'A':
Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:429:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
# 427| break;
# 428| case 'A':
# 429|-> pgp->status = PGSTATE_ACTIVE;
# 430| break;
# 431| case 'E':
Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:432:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
# 430| break;
# 431| case 'E':
# 432|-> pgp->status = PGSTATE_ENABLED;
# 433| break;
# 434| default:
Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:435:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
# 433| break;
# 434| default:
# 435|-> pgp->status = PGSTATE_UNDEF;
# 436| break;
# 437| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:491:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
# 489| switch (*word) {
# 490| case 'F':
# 491|-> pp->dmstate = PSTATE_FAILED;
# 492| break;
# 493| case 'A':
Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:494:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
# 492| break;
# 493| case 'A':
# 494|-> pp->dmstate = PSTATE_ACTIVE;
# 495| break;
# 496| default:
Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:508:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:415:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c:475:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
# 506| return 1;
# 507|
# 508|-> pp->failcount = atoi(word);
# 509| free(word);
# 510|
Error: CPPCHECK_WARNING: [#def44]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_path_by_syspath’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:494:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:33: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:32: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:36: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:491:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:492:42: note: in expansion of macro ‘nvme_pg_to_path’
# 492| struct nvme_path *path = nvme_pg_to_path(pg);
# 493|
# 494|-> psyspath = udev_device_get_syspath(path->udev);
# 495| if (psyspath && !strcmp(ppath, psyspath))
# 496| return path;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_controllers’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:646:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:644:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:645:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:645:24: note: in expansion of macro ‘nvme_pg_to_path’
# 644| vector_foreach_slot(&map->pgvec, pg, i) {
# 645| path = nvme_pg_to_path(pg);
# 646|-> path->seen = false;
# 647| }
# 648|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:755:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:753:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:754:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/foreign/nvme.c:754:24: note: in expansion of macro ‘nvme_pg_to_path’
# 753| vector_foreach_slot_backwards(&map->pgvec, pg, i) {
# 754| path = nvme_pg_to_path(pg);
# 755|-> if (!path->seen) {
# 756| condlog(1, "path %d not found in %s any more",
# 757| i, udev_device_get_sysname(map->udev));
Error: GCC_ANALYZER_WARNING (CWE-126): [#def48]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:47: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:26:40: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:121:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:54:26: note: in definition of macro ‘LIST_HEAD’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:28: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:40: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:121:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:121:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:26:40: note: read of 8 bytes from after the end of ‘uevlisten_tmp’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:121:9: note: in expansion of macro ‘list_for_each_entry_safe’
# └──────────────────────────────────────┘
# ^
# 24|
# 25| #define container_of(ptr, type, member) ({ \
# 26|-> typeof( ((type *)0)->member ) *__mptr = (ptr); \
# 27| (type *)( (char *)__mptr - offsetof(type,member) );})
# 28|
Error: CLANG_WARNING: [#def49]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:12: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/structs.h:9: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prio.h:7: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers.h:5: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:123:13: warning[unix.Malloc]: Use of memory after it is freed
# 121| static inline void list_del(struct list_head *entry)
# 122| {
# 123|-> __list_del(entry->prev, entry->next);
# 124| entry->next = LIST_POISON1;
# 125| entry->prev = LIST_POISON2;
Error: CPPCHECK_WARNING (CWE-758): [#def50]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/nvme-ioctl.c:572: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 570| bool save, __u32 data_len, void *data, __u32 *result)
# 571| {
# 572|-> __u32 cdw10 = fid | (save ? 1 << 31 : 0);
# 573|
# 574| return nvme_feature(fd, nvme_admin_set_features, nsid, cdw10, value,
Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c: scope_hint: In function ‘prios_match’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:185:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:11: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
# 183| prios_match(struct path *pp1, struct path *pp2)
# 184| {
# 185|-> return (pp1->priority == pp2->priority);
# 186| }
# 187|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:185:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
# 183| prios_match(struct path *pp1, struct path *pp2)
# 184| {
# 185|-> return (pp1->priority == pp2->priority);
# 186| }
# 187|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c: scope_hint: In function ‘tpg_match’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:191:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
# 189| tpg_match(struct path *pp1, struct path *pp2)
# 190| {
# 191|-> return (pp1->tpg_id == pp2->tpg_id);
# 192| }
# 193|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:191:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
# 189| tpg_match(struct path *pp1, struct path *pp2)
# 190| {
# 191|-> return (pp1->tpg_id == pp2->tpg_id);
# 192| }
# 193|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c: scope_hint: In function ‘_print_multipath_topology’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c:888:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_path_layout()’
# 886|
# 887| fieldwidth_t *alloc_path_layout(void) {
# 888|-> return calloc(ARRAY_SIZE(pd), sizeof(fieldwidth_t));
# 889| }
# 890|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c: scope_hint: In function ‘_snprint_multipath_topology’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c:945:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_multipath_layout()’
# 943| fieldwidth_t *alloc_multipath_layout(void) {
# 944|
# 945|-> return calloc(ARRAY_SIZE(mpd), sizeof(fieldwidth_t));
# 946| }
# 947|
Error: CLANG_WARNING: [#def57]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c:1219:15: warning[unix.Malloc]: Potential leak of memory pointed to by 'p_width'
# 1217|
# 1218| _snprint_multipath_topology(gmp, &buff, verbosity, p_width);
# 1219|-> printf("%s", get_strbuf_str(&buff));
# 1220| }
# 1221|
Error: CLANG_WARNING: [#def58]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/print.c:1255:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'width'
# 1253|
# 1254| if (verbosity == 1)
# 1255|-> return _snprint_multipath(gmp, buff, "%n", width);
# 1256|
# 1257| if(isatty(1) &&
Error: GCC_ANALYZER_WARNING (CWE-688): [#def59]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prioritizers/iet.c: scope_hint: In function ‘iet_prio’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prioritizers/iet.c:106:39: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir(&fullpath)’ where non-null expected
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prioritizers/iet.c:1: included_from: Included from here.
/usr/include/dirent.h:164:23: note: argument 1 of ‘readdir’ must be non-null
# 104|
# 105| // loop to find device in /dev/disk/by-path
# 106|-> while( NULL != (dir_entry_p = readdir(dir_p))) {
# 107| if (dir_entry_p->d_name[0] != '.') {
# 108| char path[BUFFERSIZE] = "/dev/disk/by-path/";
Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/sysfs.c: scope_hint: In function ‘sysfs_is_multipathed’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/sysfs.c:309:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 0)’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/sysfs.c:38: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/sysfs.c:305:21: note: in expansion of macro ‘safe_snprintf’
# 307| continue;
# 308|
# 309|-> fd = open(pathbuf, O_RDONLY);
# 310| if (fd == -1) {
# 311| condlog(1, "%s: error opening %s", __func__, pathbuf);
Error: CLANG_WARNING: [#def61]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:375:2: warning[unix.Malloc]: Use of memory after it is freed
# 373| struct uevent *earlier, *tmp;
# 374|
# 375|-> list_for_some_entry_reverse_safe(earlier, tmp, &later->node, &st->uevq, node) {
# 376| /*
# 377| * filter unnecessary earlier uevents
Error: CLANG_WARNING: [#def62]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:409:2: warning[unix.Malloc]: Use of memory after it is freed
# 407| struct uevent *earlier, *tmp;
# 408|
# 409|-> list_for_some_entry_reverse_safe(earlier, tmp, &later->node, &st->uevq, node) {
# 410| if (merge_need_stop(earlier, later))
# 411| break;
Error: CLANG_WARNING: [#def63]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:439:3: warning[unix.Malloc]: Use of memory after it is freed
# 437|
# 438| list_for_some_entry_reverse(later, &st->uevq, st->old_tail, node)
# 439|-> uevent_filter(later, st);
# 440|
# 441| if(uevent_need_merge(st->conf))
Error: CLANG_WARNING: [#def64]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/uevent.c:443:4: warning[unix.Malloc]: Use of memory after it is freed
# 441| if(uevent_need_merge(st->conf))
# 442| list_for_some_entry_reverse(later, &st->uevq, st->old_tail, node)
# 443|-> uevent_merge(later, st);
# 444| }
# 445|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c: scope_hint: In function ‘check_mountinfo’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:208:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:26: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/util.h:40:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/util.h:33:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:23: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:129:13: note: in expansion of macro ‘VECTOR_SIZE’
# 206| pthread_cleanup_push(cleanup_cache, cache);
# 207| if (mnt_table_set_cache(tbl, cache) == 0) {
# 208|-> stream = fopen(mountinfo, "r");
# 209| if (stream != NULL) {
# 210| pthread_cleanup_push(cleanup_fclose, stream);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:208:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/util.h:40:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/util.h:33:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/valid.c:129:13: note: in expansion of macro ‘VECTOR_SIZE’
# 206| pthread_cleanup_push(cleanup_cache, cache);
# 207| if (mnt_table_set_cache(tbl, cache) == 0) {
# 208|-> stream = fopen(mountinfo, "r");
# 209| if (stream != NULL) {
# 210| pthread_cleanup_push(cleanup_fclose, stream);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipath/main.c: scope_hint: In function ‘print_cmd_valid’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipath/main.c:410:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prio.h:8: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipath/main.c:36: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipath/main.c:407:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipath/main.c:407:22: note: in expansion of macro ‘VECTOR_SLOT’
# 408| select_find_multipaths_timeout(conf, pp);
# 409| wait = find_multipaths_check_timeout(
# 410|-> pp, pp->find_multipaths_timeout, &until);
# 411| if (wait != FIND_MULTIPATHS_WAITING)
# 412| k = PATH_IS_NOT_VALID;
Error: GCC_ANALYZER_WARNING (CWE-415): [#def68]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_clean_els_marginal_list’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:503:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘els_marginal_list_head.next + -2056’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/checkers.h:5: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/prio.h:7: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/structs.h:9: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:12: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:500:29: note: in expansion of macro ‘list_first_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:500:29: note: in expansion of macro ‘list_first_entry’
# 501| node);
# 502| list_del(&els_marg->node);
# 503|-> free(els_marg);
# 504| }
# 505| }
Error: GCC_ANALYZER_WARNING: [#def69]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_fabric_notification_receiver’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/fpin_handlers.c:619:23: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
# 617|
# 618| condlog(4, "Waiting for ELS...\n");
# 619|-> ret = read(fd, buf, DEF_RX_BUF_SIZE);
# 620| if (ret < 0) {
# 621| condlog(0, "failed to read the els frame (%d)", ret);
Error: GCC_ANALYZER_WARNING (CWE-688): [#def70]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c: scope_hint: In function ‘reconfigure_check_uid_attrs’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3007:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:56: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3021:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/parser.h:35: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:42: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3001:13: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3001:39: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3004:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3005:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3005:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3005:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3005:29: note: in expansion of macro ‘VECTOR_SLOT’
/usr/include/libdevmapper.h:30: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:10: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
# 3005| char *new = VECTOR_SLOT(new_attrs, i);
# 3006|
# 3007|-> if (strcmp(old, new))
# 3008| return true;
# 3009| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c: scope_hint: In function ‘daemonize’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3678:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 3676| fprintf(stderr, "cannot chdir to '/', continuing\n");
# 3677|
# 3678|-> dev_null_fd = open("/dev/null", O_RDWR);
# 3679| if (dev_null_fd < 0){
# 3680| fprintf(stderr, "cannot open /dev/null for input & output : %s\n",
Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3685:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
# 3683| }
# 3684|
# 3685|-> if (dup2(dev_null_fd, STDIN_FILENO) < 0) {
# 3686| fprintf(stderr, "cannot dup2 /dev/null to stdin : %s\n",
# 3687| strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3690:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
# 3688| _exit(0);
# 3689| }
# 3690|-> if (dup2(dev_null_fd, STDOUT_FILENO) < 0) {
# 3691| fprintf(stderr, "cannot dup2 /dev/null to stdout : %s\n",
# 3692| strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3695:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
# 3693| _exit(0);
# 3694| }
# 3695|-> if (dup2(dev_null_fd, STDERR_FILENO) < 0) {
# 3696| fprintf(stderr, "cannot dup /dev/null to stderr : %s\n",
# 3697| strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c: scope_hint: In function ‘daemonize’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3702:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
# 3700| daemon_pid = getpid();
# 3701| return 0;
# 3702|-> }
# 3703|
# 3704| int
Error: CLANG_WARNING: [#def76]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3806:4: warning[deadcode.DeadStores]: Value stored to 'c' is never read
# 3804| }
# 3805| }
# 3806|-> c += snprintf(c, s + CMDSIZE - c, "\n");
# 3807| }
# 3808| if (!s) {
Error: CLANG_WARNING: [#def77]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/main.c:3953:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 3951| }
# 3952| pthread_attr_destroy(&attr);
# 3953|-> rc = pthread_join(thread, NULL);
# 3954| return 0;
# 3955|
Error: CPPCHECK_WARNING: [#def78]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c: scope_hint: In function ‘key_generator’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c:97:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c:14: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c:92:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/multipathc.c:92:30: note: in expansion of macro ‘VECTOR_SLOT’
# 95| * parameter, not the keyword. Don't delete it.
# 96| */
# 97|-> if (!kw->param) {
# 98| free_key(kw);
# 99| vector_del_slot(v, VECTOR_SIZE(v) - 1);
Error: CLANG_WARNING: [#def80]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/uxlsnr.c:340:2: warning[core.NullDereference]: Dereference of null pointer
# 338| struct client *c;
# 339|
# 340|-> list_for_each_entry(c, &clients, node) {
# 341| if (c != skip && c->state == CLT_LOCKED_WORK) {
# 342| clients_need_lock = true;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/uxlsnr.c: scope_hint: In function ‘client_state_machine’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/uxlsnr.c:510:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/multipathd/uxlsnr.c:30: included_from: Included from here.
device-mapper-multipath-0.9.7-build/multipath-tools-0.9.7/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
# 508| struct key *kw = VECTOR_SLOT(c->cmdvec, 0);
# 509|
# 510|-> if (!c->is_root && kw->code != VRB_LIST) {
# 511| c->error = -EPERM;
# 512| condlog(0, "%s: cli[%d]: unauthorized cmd \"%s\"",
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-13.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | device-mapper-multipath-0.9.7-7.fc40 |
store-results-to | /tmp/tmplsg30bro/device-mapper-multipath-0.9.7-7.fc40.tar.xz |
time-created | 2024-07-03 12:19:49 |
time-finished | 2024-07-03 12:22:16 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmplsg30bro/device-mapper-multipath-0.9.7-7.fc40.tar.xz' '--gcc-analyze' '/tmp/tmplsg30bro/device-mapper-multipath-0.9.7-7.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |