svn commit: r356722 - stable/12/sbin/fsck_msdosfs
Xin LI
delphij at FreeBSD.org
Tue Jan 14 06:28:08 UTC 2020
Author: delphij
Date: Tue Jan 14 06:28:07 2020
New Revision: 356722
URL: https://svnweb.freebsd.org/changeset/base/356722
Log:
MFC r356628: Require FAT to occupy at least one sector.
Modified:
stable/12/sbin/fsck_msdosfs/boot.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sbin/fsck_msdosfs/boot.c
==============================================================================
--- stable/12/sbin/fsck_msdosfs/boot.c Tue Jan 14 06:15:41 2020 (r356721)
+++ stable/12/sbin/fsck_msdosfs/boot.c Tue Jan 14 06:28:07 2020 (r356722)
@@ -253,7 +253,7 @@ readboot(int dosfs, struct bootblock *boot)
boot->FATsecs = boot->bpbFATsmall;
}
- if (boot->FATsecs > UINT32_MAX / boot->bpbFATs) {
+ if (boot->FATsecs < 1 || boot->FATsecs > UINT32_MAX / boot->bpbFATs) {
pfatal("Invalid FATs(%u) with FATsecs(%zu)",
boot->bpbFATs, (size_t)boot->FATsecs);
return FSFATAL;
More information about the svn-src-all
mailing list