diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-12-06 02:08:46 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-12-06 02:08:46 +0000 |
commit | 461d1f1c9415bc456fcbadfe60be021b58e9ea1f (patch) | |
tree | 1a16ee3b9a7dcb412e56dcaa0c95a8d48c0a87c6 /sys | |
parent | 24449fa30e213eb2f37c81d23ad37b15b5d4fd99 (diff) | |
download | FreeBSD-src-461d1f1c9415bc456fcbadfe60be021b58e9ea1f.zip FreeBSD-src-461d1f1c9415bc456fcbadfe60be021b58e9ea1f.tar.gz |
More tightly verify the preference returned for the new inode.
Submitted by: Kris Kennaway <kris@obsecurity.org>
Sponsored by: DARPA & NAI Labs.
Approved by: re
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 2b58167..b8921b4 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -841,7 +841,7 @@ ffs_valloc(pvp, mode, cred, vpp) ipref = ffs_dirpref(pip); else ipref = pip->i_number; - if (ipref >= fs->fs_ncg * fs->fs_ipg) + if ((unsigned)ipref >= fs->fs_ncg * fs->fs_ipg) ipref = 0; cg = ino_to_cg(fs, ipref); /* |