diff options
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_vfsops.c')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index f820b2a..cf68ec1 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 |