file-5.45-6.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
file-5.45-build/file-5.45/src/apprentice.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
file-5.45-build/file-5.45/src/ascmagic.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
file-5.45-build/file-5.45/src/cdf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
file-5.45-build/file-5.45/src/compress.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
file-5.45-build/file-5.45/src/der.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
file-5.45-build/file-5.45/src/encoding.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
file-5.45-build/file-5.45/src/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def8]
file-5.45-build/file-5.45/src/fmtcheck.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
file-5.45-build/file-5.45/src/funcs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
file-5.45-build/file-5.45/src/is_csv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
file-5.45-build/file-5.45/src/is_json.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
file-5.45-build/file-5.45/src/is_simh.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def13]
file-5.45-build/file-5.45/src/is_tar.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def14]
file-5.45-build/file-5.45/src/magic.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
file-5.45-build/file-5.45/src/print.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
file-5.45-build/file-5.45/src/readcdf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
file-5.45-build/file-5.45/src/readelf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-457): [#def18]
file-5.45-build/file-5.45/src/readelf.c:141:33: warning[-Wmaybe-uninitialized]: 'cap32.c_un.c_val' may be used uninitialized
#  141 | #define elf_getu32(swap, value) getu32(swap, value)
#      |                                 ^~~~~~~~~~~~~~~~~~~
file-5.45-build/file-5.45/src/readelf.c:1502:43: note: 'cap32' declared here
# 1502 |                                 Elf32_Cap cap32;
#      |                                           ^~~~~
#  139|   
#  140|   #define elf_getu16(swap, value) getu16(swap, value)
#  141|-> #define elf_getu32(swap, value) getu32(swap, value)
#  142|   #define elf_getu64(swap, value) getu64(swap, value)
#  143|   

Error: COMPILER_WARNING (CWE-457): [#def19]
file-5.45-build/file-5.45/src/readelf.c: scope_hint: In function 'doshn'
file-5.45-build/file-5.45/src/readelf.c:142:33: warning[-Wmaybe-uninitialized]: 'cap64.c_un.c_val' may be used uninitialized
#  142 | #define elf_getu64(swap, value) getu64(swap, value)
#      |                                 ^~~~~~~~~~~~~~~~~~~
file-5.45-build/file-5.45/src/readelf.c:1503:43: note: 'cap64' declared here
# 1503 |                                 Elf64_Cap cap64;
#      |                                           ^~~~~
#  140|   #define elf_getu16(swap, value) getu16(swap, value)
#  141|   #define elf_getu32(swap, value) getu32(swap, value)
#  142|-> #define elf_getu64(swap, value) getu64(swap, value)
#  143|   
#  144|   #define xsh_addr	(clazz == ELFCLASS32			\

Error: CPPCHECK_WARNING: [#def20]
file-5.45-build/file-5.45/src/softmagic.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-758): [#def21]
file-5.45-build/file-5.45/src/softmagic.c:1220: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1218|   	}
# 1219|   	case FILE_BESHORT:
# 1220|-> 		p->h = CAST(short, BE16(p));
# 1221|   		if (cvt_16(p, m) == -1)
# 1222|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def22]
file-5.45-build/file-5.45/src/softmagic.c:1227: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1225|   	case FILE_BEDATE:
# 1226|   	case FILE_BELDATE:
# 1227|-> 		p->l = CAST(int32_t, BE32(p));
# 1228|   		if (cvt_32(p, m) == -1)
# 1229|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def23]
file-5.45-build/file-5.45/src/softmagic.c:1235: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1233|   	case FILE_BEQLDATE:
# 1234|   	case FILE_BEQWDATE:
# 1235|-> 		p->q = CAST(uint64_t, BE64(p));
# 1236|   		if (cvt_64(p, m) == -1)
# 1237|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def24]
file-5.45-build/file-5.45/src/softmagic.c:1240: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1238|   		return 1;
# 1239|   	case FILE_LESHORT:
# 1240|-> 		p->h = CAST(short, LE16(p));
# 1241|   		if (cvt_16(p, m) == -1)
# 1242|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def25]
file-5.45-build/file-5.45/src/softmagic.c:1247: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1245|   	case FILE_LEDATE:
# 1246|   	case FILE_LELDATE:
# 1247|-> 		p->l = CAST(int32_t, LE32(p));
# 1248|   		if (cvt_32(p, m) == -1)
# 1249|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def26]
file-5.45-build/file-5.45/src/softmagic.c:1255: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1253|   	case FILE_LEQLDATE:
# 1254|   	case FILE_LEQWDATE:
# 1255|-> 		p->q = CAST(uint64_t, LE64(p));
# 1256|   		if (cvt_64(p, m) == -1)
# 1257|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def27]
file-5.45-build/file-5.45/src/softmagic.c:1262: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1260|   	case FILE_MEDATE:
# 1261|   	case FILE_MELDATE:
# 1262|-> 		p->l = CAST(int32_t, ME32(p));
# 1263|   		if (cvt_32(p, m) == -1)
# 1264|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def28]
file-5.45-build/file-5.45/src/softmagic.c:1271: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1269|   		return 1;
# 1270|   	case FILE_BEFLOAT:
# 1271|-> 		p->l = BE32(p);
# 1272|   		if (cvt_float(p, m) == -1)
# 1273|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def29]
file-5.45-build/file-5.45/src/softmagic.c:1276: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1274|   		return 1;
# 1275|   	case FILE_LEFLOAT:
# 1276|-> 		p->l = LE32(p);
# 1277|   		if (cvt_float(p, m) == -1)
# 1278|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def30]
file-5.45-build/file-5.45/src/softmagic.c:1285: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1283|   		return 1;
# 1284|   	case FILE_BEDOUBLE:
# 1285|-> 		p->q = BE64(p);
# 1286|   		if (cvt_double(p, m) == -1)
# 1287|   			goto out;

Error: CPPCHECK_WARNING (CWE-758): [#def31]
file-5.45-build/file-5.45/src/softmagic.c:1290: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1288|   		return 1;
# 1289|   	case FILE_LEDOUBLE:
# 1290|-> 		p->q = LE64(p);
# 1291|   		if (cvt_double(p, m) == -1)
# 1292|   			goto out;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-34.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namefile-5.45-6.fc41
store-results-to/tmp/tmp09auviux/file-5.45-6.fc41.tar.xz
time-created2024-07-03 12:42:27
time-finished2024-07-03 12:44:04
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp09auviux/file-5.45-6.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp09auviux/file-5.45-6.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9