Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-682): [#def1]
exfatprogs-1.4.1/fsck/fsck.c:1787: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1785|   	const size_t ss = 1 << bs->bsx.sect_size_bits;
# 1786|   	uint8_t *sectors = malloc(ss * 12);
# 1787|-> 	__le32 *const chks = (__le32*)(sectors + ss * 11);
# 1788|   	__le32 *const chks_end = (__le32*)(sectors + ss * 12);
# 1789|   	off_t idx = BOOT_SEC_IDX;

Error: CPPCHECK_WARNING (CWE-682): [#def2]
exfatprogs-1.4.1/fsck/fsck.c:1788: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1786|   	uint8_t *sectors = malloc(ss * 12);
# 1787|   	__le32 *const chks = (__le32*)(sectors + ss * 11);
# 1788|-> 	__le32 *const chks_end = (__le32*)(sectors + ss * 12);
# 1789|   	off_t idx = BOOT_SEC_IDX;
# 1790|   	unsigned int checksum = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
exfatprogs-1.4.1/fsck/fsck.c:1810:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘sectors’ where non-null expected
exfatprogs-1.4.1/fsck/fsck.c:1786:28: acquire_memory: this call could return NULL
exfatprogs-1.4.1/fsck/fsck.c:1792:9: branch_true: following ‘true’ branch (when ‘ss > 511’)...
exfatprogs-1.4.1/fsck/fsck.c:1794:12: branch_true: ...to here
exfatprogs-1.4.1/fsck/fsck.c:1794:12: branch_false: following ‘false’ branch (when ‘sectors’ is non-NULL)...
exfatprogs-1.4.1/fsck/fsck.c:1801:54: branch_false: ...to here
exfatprogs-1.4.1/fsck/fsck.c:1803:12: branch_true: following ‘true’ branch (when ‘recursive != 0’)...
exfatprogs-1.4.1/fsck/fsck.c:1804:49: branch_true: ...to here
exfatprogs-1.4.1/fsck/fsck.c:1810:9: danger: argument 1 (‘sectors’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
# 1808|   		memset(bs->mbr.part_entries, 0, sizeof(bs->mbr.part_entries));
# 1809|   	}
# 1810|-> 	memcpy(sectors, bs, sizeof(struct pbr));
# 1811|   	memset(sectors + sizeof(struct pbr), 0, ss - sizeof(struct pbr));
# 1812|   

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-108.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameexfatprogs-1.3.2-1.fc44
diffbase-store-results-to/tmp/tmp5biisqf0/exfatprogs-1.3.2-1.fc44.tar.xz
diffbase-time-created2026-06-01 11:52:11
diffbase-time-finished2026-06-01 11:53:56
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp5biisqf0/exfatprogs-1.3.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5biisqf0/exfatprogs-1.3.2-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-108.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameexfatprogs-1.4.1-1.fc45
store-results-to/tmp/tmpb2cy1gp7/exfatprogs-1.4.1-1.fc45.tar.xz
time-created2026-06-01 11:54:15
time-finished2026-06-01 11:55:34
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpb2cy1gp7/exfatprogs-1.4.1-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpb2cy1gp7/exfatprogs-1.4.1-1.fc45.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9