aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorTom Rhodes <trhodes@FreeBSD.org>2002-08-22 22:17:11 +0000
committerTom Rhodes <trhodes@FreeBSD.org>2002-08-22 22:17:11 +0000
commitabe78e97084030a6d5956a041482af989f2695fe (patch)
tree8c773cfbe8df9d8f90e5c72908db508e443672e8 /sys/fs
parentc6d6cf1772d00c58f9c522acd5906fd93515fb9f (diff)
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index f820b2aaa9d5..cf68ec1e42c9 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -543,8 +543,14 @@ mountmsdosfs(devvp, mp, td, argp)
}
/*
- * Check and validate (or perhaps invalidate?) the fsinfo structure? XXX
+ * Check and validate (or perhaps invalidate?) the fsinfo structure?
*/
+ if (pmp->pm_fsinfo && pmp->pm_nxtfree > pmp->pm_maxcluster) {
+ printf("Next free cluster in FSInfo (%u) exceeds maxcluster (%u)\n",
+ pmp->pm_nxtfree, pmp->pm_maxcluster);
+ error = EINVAL;
+ goto error_exit;
+ }
/*
* Allocate memory for the bitmap of allocated clusters, and then