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
This commit is contained in:
parent
24449fa30e
commit
461d1f1c94
@ -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);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user