mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
panic if length is < 0 in ffs_truncate().
This commit is contained in:
parent
8fceb1ba2d
commit
01825ed3fa
1 changed files with 3 additions and 1 deletions
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_inode.c 8.5 (Berkeley) 12/30/93
|
||||
* $Id: ffs_inode.c,v 1.5 1994/08/03 08:19:35 davidg Exp $
|
||||
* $Id: ffs_inode.c,v 1.6 1994/08/29 06:09:13 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -163,6 +163,8 @@ ffs_truncate(ap)
|
|||
int aflags, error, allerror;
|
||||
off_t osize;
|
||||
|
||||
if (length < 0)
|
||||
panic("ffs_truncate: invalid length");
|
||||
oip = VTOI(ovp);
|
||||
tv = time;
|
||||
if (ovp->v_type == VLNK &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue