MFC r206098: mountmsdosfs: reject too high value of bytes per cluster

This commit is contained in:
Andriy Gapon 2010-04-12 20:53:17 +00:00
parent e42bcb8719
commit 8d5ce86fd6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=206502

View File

@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp)
|| (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1))
|| (pmp->pm_HugeSectors == 0)
|| (pmp->pm_FATsecs == 0)
|| (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE)
) {
error = EINVAL;
goto error_exit;