summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-05-18 00:33:08 +0000
committerpfg <pfg@FreeBSD.org>2016-05-18 00:33:08 +0000
commit4da88f96a80a3e9db40884446416ef494569b06d (patch)
treed9aef91207b31f4c309c97ff82647e39d8c92e57 /sbin
parentbbf994c9e11e7fd930b929ef68a3857de7a1d99a (diff)
downloadFreeBSD-src-4da88f96a80a3e9db40884446416ef494569b06d.zip
FreeBSD-src-4da88f96a80a3e9db40884446416ef494569b06d.tar.gz
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)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck_msdosfs/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c
index 3195183..851b187b 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;
OpenPOWER on IntegriCloud