diff options
author | Bruce Evans <bde@FreeBSD.org> | 1995-04-11 16:43:20 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1995-04-11 16:43:20 +0000 |
commit | 82f196916e0cdee5884e6e602eddaf7036f0b650 (patch) | |
tree | 4acba5f6302c7c5da00c52b2246e0840f2d14d23 /sys/msdosfs/msdosfs_fat.c | |
parent | 7565491c797f9e5259281a8fd7f8ad1f86e14980 (diff) |
Submitted by: Wolfgang Solfrank <ws@tools.de>
Fix off-by-1-sector error in the range checking for the end of the root
directory. It was possible for the root directory to overwrite the FAT.
Notes
Notes:
svn path=/head/; revision=7754
Diffstat (limited to 'sys/msdosfs/msdosfs_fat.c')
-rw-r--r-- | sys/msdosfs/msdosfs_fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c index 9a8420cee8ff..06b30e460c4b 100644 --- a/sys/msdosfs/msdosfs_fat.c +++ b/sys/msdosfs/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_fat.c,v 1.4 1994/12/12 12:35:45 bde Exp $ */ +/* $Id: msdosfs_fat.c,v 1.5 1995/02/10 18:39:45 bde Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */ /*- @@ -163,7 +163,7 @@ pcbmap(dep, findcn, bnp, cnp) */ if (cn == MSDOSFSROOT) { if (dep->de_Attributes & ATTR_DIRECTORY) { - if (findcn * pmp->pm_SectPerClust > pmp->pm_rootdirsize) { + if (findcn * pmp->pm_SectPerClust >= pmp->pm_rootdirsize) { if (cnp) *cnp = pmp->pm_rootdirsize / pmp->pm_SectPerClust; return E2BIG; |