exfatprogs-1.2.2-3.fc40

List of Defects

Error: CPPCHECK_WARNING: [#def1]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/dump/dump.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/exfat2img/exfat2img.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def3]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/exfat2img/exfat2img.c:493:3: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
#  491|   		}
#  492|   
#  493|-> 		ret = exfat_de_iter_advance(de_iter, dentry_count);
#  494|   	}
#  495|   out:

Error: CLANG_WARNING: [#def4]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/exfat2img/exfat2img.c:895:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  893|   	fsync(ei->out_fd);
#  894|   	exfat_free_buffer(ei->dump_bdesc, 2);
#  895|-> 	return ret;
#  896|   }
#  897|   

Error: CPPCHECK_WARNING: [#def5]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/fsck/fsck.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def6]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/fsck/fsck.c:1186:27: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'bitmap_t'
# 1184|   	}
# 1185|   
# 1186|-> 	fsck->name_hash_bitmap = malloc(EXFAT_BITMAP_SIZE(EXFAT_MAX_HASH_COUNT));
# 1187|   	if (!fsck->name_hash_bitmap) {
# 1188|   		exfat_err("failed to allocate name hash bitmap\n");

Error: CLANG_WARNING: [#def7]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/fsck/fsck.c:1251:2: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 1249|   	if (err && err != EOF)
# 1250|   		exfat_err("failed to read volume label\n");
# 1251|-> 	err = 0;
# 1252|   
# 1253|   	err = read_bitmap(exfat);

Error: CPPCHECK_WARNING: [#def8]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/fsck/repair.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/label/label.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def11]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c:381:8: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dentry')
#  379|   		}
#  380|   
#  381|-> 		if (!IS_EXFAT_DELETED(dentry->type)) {
#  382|   			if (filter->in.dentry_count == 0 ||
#  383|   			    empty_dentry_count < filter->in.dentry_count)

Error: CLANG_WARNING: [#def12]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c:407:6: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  405|   				for (i = 0; i < dentry_count; i++) {
#  406|   					exfat_de_iter_get(&de_iter, i, &d);
#  407|-> 					memcpy(filter->out.dentry_set + i, d,
#  408|   					       sizeof(struct exfat_dentry));
#  409|   				}

Error: CLANG_WARNING: [#def13]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c:521:2: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'utf16_name' is still referred to by the stack variable 'filter' upon returning to the caller.  This will be a dangling reference
#  519|   		return retval;
#  520|   
#  521|-> 	return exfat_lookup_file_by_utf16name(exfat, parent, utf16_name,
#  522|   			filter_out);
#  523|   }

Error: CLANG_WARNING: [#def14]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c:937:10: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  935|   	if (err == 0) {
#  936|   		dset = filter.out.dentry_set;
#  937|-> 		dcount = filter.out.dentry_count;
#  938|   		if ((le16_to_cpu(dset->dentry.file.attr) & attr) != attr)
#  939|   			err = -EEXIST;

Error: CLANG_WARNING: [#def15]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_dir.c:949:18: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  947|   
#  948|   	loc.parent = parent;
#  949|-> 	loc.file_offset = filter.out.file_offset;
#  950|   	loc.dev_offset = filter.out.dev_offset;
#  951|   	err = exfat_add_dentry_set(exfat, &loc, dset, dcount, false);

Error: CPPCHECK_WARNING: [#def16]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_fs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_fs.c:142:32: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'bitmap_t'
#  140|   
#  141|   	/* TODO: bitmap could be very large. */
#  142|-> 	exfat->alloc_bitmap = (char *)calloc(1,
#  143|   			EXFAT_BITMAP_SIZE(exfat->clus_count));
#  144|   	if (!exfat->alloc_bitmap) {

Error: CLANG_WARNING: [#def18]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_fs.c:150:3: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'bitmap_t'
#  148|   
#  149|   	exfat->ohead_bitmap =
#  150|-> 		calloc(1, EXFAT_BITMAP_SIZE(exfat->clus_count));
#  151|   	if (!exfat->ohead_bitmap) {
#  152|   		exfat_err("failed to allocate bitmap\n");

Error: CLANG_WARNING: [#def19]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/exfat_fs.c:157:3: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'bitmap_t'
#  155|   
#  156|   	exfat->disk_bitmap =
#  157|-> 		calloc(1, EXFAT_BITMAP_SIZE(exfat->clus_count));
#  158|   	if (!exfat->disk_bitmap) {
#  159|   		exfat_err("failed to allocate bitmap\n");

Error: CPPCHECK_WARNING: [#def20]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/libexfat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def21]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/libexfat.c: scope_hint: In function ‘exfat_set_volume_label’
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/libexfat.c:483:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&volume_label’
#  481|   	}
#  482|   
#  483|-> 	memcpy(pvol->vol_label, volume_label, volume_label_len);
#  484|   	pvol->vol_char_cnt = volume_label_len/2;
#  485|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def22]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/libexfat.c: scope_hint: In function ‘exfat_write_checksum_sector’
exfatprogs-1.2.2-build/exfatprogs-1.2.2/lib/libexfat.c:696:24: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  694|   	unsigned int sec_idx = CHECKSUM_SEC_IDX;
#  695|   
#  696|-> 	checksum_buf = malloc(bd->sector_size);
#  697|   	if (!checksum_buf)
#  698|   		return -1;

Error: CPPCHECK_WARNING: [#def23]
exfatprogs-1.2.2-build/exfatprogs-1.2.2/mkfs/mkfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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-118.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameexfatprogs-1.2.2-3.fc40
store-results-to/tmp/tmpo_y0rn48/exfatprogs-1.2.2-3.fc40.tar.xz
time-created2024-07-03 12:29:24
time-finished2024-07-03 12:30:51
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpo_y0rn48/exfatprogs-1.2.2-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpo_y0rn48/exfatprogs-1.2.2-3.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9