From 890d6d63bbddc7db228da0e7dea10eb772952512 Mon Sep 17 00:00:00 2001 From: pfg Date: Wed, 18 May 2016 00:33:08 +0000 Subject: [PATCH] MFC r299089: fsck_msdosfs: Adjust a check. The on-disk FAT array does not include anything before CLUST_FIRST, compensate in size check. Obtained from: NetBSD (CVS Rev. 1.20) git-svn-id: svn://svn.freebsd.org/base/stable/10@300099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/fsck_msdosfs/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 319518349..851b187ba 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -221,7 +221,7 @@ readboot(int dosfs, struct bootblock *boot) break; } - if (boot->NumFatEntries < boot->NumClusters) { + if (boot->NumFatEntries < boot->NumClusters - CLUST_FIRST) { pfatal("FAT size too small, %u entries won't fit into %u sectors\n", boot->NumClusters, boot->FATsecs); return FSFATAL; -- 2.45.0