diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-07-01 22:03:33 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-07-01 22:03:33 +0000 |
commit | 036b858cf6e49f715769620cd15b703983be8f6a (patch) | |
tree | ae8a5c7bbcf19453ad083ad5f4c3bb60263cdd66 /sys/kern/vfs_syscalls.c | |
parent | 74cb3d14202a9b7b696d1658f79df6c41b8a8f0a (diff) |
Oops. Lost the < 0 check on file position I had in the circulated
diff. A bit of paranoia suggested by beck@.
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 16249419534..e5cf95f8aed 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.162 2010/07/01 17:31:22 krw Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.163 2010/07/01 22:03:32 krw Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -2312,7 +2312,7 @@ sys_getdirentries(struct proc *p, void *v, register_t *retval) error = EBADF; goto bad; } - if (fp->f_offset > LONG_MAX) { + if ((fp->f_offset < 0) || (fp->f_offset > LONG_MAX)) { error = EINVAL; goto bad; } |