summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-12-06 02:08:46 +0000
committermckusick <mckusick@FreeBSD.org>2002-12-06 02:08:46 +0000
commit461d1f1c9415bc456fcbadfe60be021b58e9ea1f (patch)
tree1a16ee3b9a7dcb412e56dcaa0c95a8d48c0a87c6 /sys/ufs
parent24449fa30e213eb2f37c81d23ad37b15b5d4fd99 (diff)
downloadFreeBSD-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/ufs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c2
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);
/*
OpenPOWER on IntegriCloud