Newly introduced findings

List of Findings

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

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
exfatprogs-1.4.2/fsck/fsck.c:1798:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘sectors’ where non-null expected
exfatprogs-1.4.2/fsck/fsck.c:1774:28: acquire_memory: this call could return NULL
exfatprogs-1.4.2/fsck/fsck.c:1780:9: branch_true: following ‘true’ branch (when ‘ss > 511’)...
exfatprogs-1.4.2/fsck/fsck.c:1782:12: branch_true: ...to here
exfatprogs-1.4.2/fsck/fsck.c:1782:12: branch_false: following ‘false’ branch (when ‘sectors’ is non-NULL)...
exfatprogs-1.4.2/fsck/fsck.c:1789:54: branch_false: ...to here
exfatprogs-1.4.2/fsck/fsck.c:1791:12: branch_true: following ‘true’ branch (when ‘recursive != 0’)...
exfatprogs-1.4.2/fsck/fsck.c:1792:49: branch_true: ...to here
exfatprogs-1.4.2/fsck/fsck.c:1798: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
# 1796|   		memset(bs->mbr.part_entries, 0, sizeof(bs->mbr.part_entries));
# 1797|   	}
# 1798|-> 	memcpy(sectors, bs, sizeof(struct pbr));
# 1799|   	memset(sectors + sizeof(struct pbr), 0, ss - sizeof(struct pbr));
# 1800|   

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
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.97.1
diffbase-analyzer-version-cppcheck2.21.1
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-180.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/tmp8zxb0kqa/exfatprogs-1.3.2-1.fc44.tar.xz
diffbase-time-created2026-08-03 14:12:29
diffbase-time-finished2026-08-03 14:14:40
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp8zxb0kqa/exfatprogs-1.3.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8zxb0kqa/exfatprogs-1.3.2-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.HEAD-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-180.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.2-3.fc45
store-results-to/tmp/tmpxw495fd1/exfatprogs-1.4.2-3.fc45.tar.xz
time-created2026-08-03 14:14:51
time-finished2026-08-03 14:16:15
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpxw495fd1/exfatprogs-1.4.2-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpxw495fd1/exfatprogs-1.4.2-3.fc45.src.rpm'
tool-versioncsmock-3.8.7.HEAD-1.el9