Author: delphij
Date: Fri Jul 27 05:40:03 2018
New Revision: 336755
URL: https://svnweb.freebsd.org/changeset/base/336755
Log:
MFC r336236: Detect and handle invalid number of FATs.
Modified:
stable/11/sbin/fsck_msdosfs/boot.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/fsck_msdosfs/boot.c
==============================================================================
--- stable/11/sbin/fsck_msdosfs/boot.c Fri Jul 27 05:21:20 2018
(r336754)
+++ stable/11/sbin/fsck_msdosfs/boot.c Fri Jul 27 05:40:03 2018
(r336755)
@@ -87,6 +87,10 @@ readboot(int dosfs, struct bootblock *boot)
pfatal("Invalid sector size: %u", boot->bpbBytesPerSec);
return FSFATAL;
}
+ if (boot->bpbFATs == 0) {
+ pfatal("Invalid number of FATs: %u", boot->bpbFATs);
+ return FSFATAL;
+ }
if (!boot->bpbRootDirEnts)
boot->flags |= FAT32;
if (boot->flags & FAT32) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"