Index: sys/fs/msdosfs/msdosfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v retrieving revision 1.91 diff -u -r1.91 msdosfs_vfsops.c --- sys/fs/msdosfs/msdosfs_vfsops.c 2002/08/13 10:05:46 1.91 +++ sys/fs/msdosfs/msdosfs_vfsops.c 2002/08/14 00:34:43 @@ -543,8 +543,14 @@ } /* - * 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