Date: Tue, 3 Jul 2001 16:24:36 +0800 From: "Jiangyi Liu" <gzjyliu@public.guangzhou.gd.cn> To: <freebsd-fs@FreeBSD.org> Subject: [PATCH]FSInfo Validation in mountmsdosfs() Message-ID: <003901c10399$9aa3cbf0$a701160a@fatcow>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
[-- Attachment #2 --]
*** msdosfs_vfsops.c.orig Sat Jun 30 14:21:15 2001
--- msdosfs_vfsops.c Sat Jun 30 14:30:25 2001
***************
*** 681,686 ****
--- 681,692 ----
/*
* Check and validate (or perhaps invalidate?) the fsinfo structure? XXX
*/
+ 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003901c10399$9aa3cbf0$a701160a>
