diff options
author | pfg <pfg@FreeBSD.org> | 2016-05-04 22:27:22 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-05-04 22:27:22 +0000 |
commit | d0f63ec230e612c0a7e95af6f95e401ddace4ac3 (patch) | |
tree | 7da9268d6761c65f58003d1b258e886109f93454 /sbin | |
parent | fab5cc8f2fccd026bc4addb69150dc5fbd1d0fb2 (diff) | |
download | FreeBSD-src-d0f63ec230e612c0a7e95af6f95e401ddace4ac3.zip FreeBSD-src-d0f63ec230e612c0a7e95af6f95e401ddace4ac3.tar.gz |
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)
MFC after: 2 weeks
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsck_msdosfs/boot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index b1760c5..667af93 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; |