From 7cdd755dfd95f80bdd81828d34a6bc5b7bdf4146 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" 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) --- 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 319518349eb3..851b187bad3d 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;