diff options
author | bde <bde@FreeBSD.org> | 1995-04-11 16:43:20 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-04-11 16:43:20 +0000 |
commit | 7f98df5944f056ea3b9f0cee97babfa8f8204528 (patch) | |
tree | 4acba5f6302c7c5da00c52b2246e0840f2d14d23 /sys/fs/msdosfs/msdosfs_fat.c | |
parent | 6d173eb9b5a3887db4c5154f881cd42543006e0e (diff) | |
download | FreeBSD-src-7f98df5944f056ea3b9f0cee97babfa8f8204528.zip FreeBSD-src-7f98df5944f056ea3b9f0cee97babfa8f8204528.tar.gz |
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.
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_fat.c')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 9a8420c..06b30e4 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/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; |