diff options
author | Peter Holm <pho@FreeBSD.org> | 2012-03-09 21:31:12 +0000 |
---|---|---|
committer | Peter Holm <pho@FreeBSD.org> | 2012-03-09 21:31:12 +0000 |
commit | 39e77c4c504c5e2f28437f9f932825861534fc30 (patch) | |
tree | 06525bf28d8d4985fc96a000b76e7774e154b90c /sys/kern/vfs_syscalls.c | |
parent | 24c8f29cf474e4028cb9aeb7215795fd421d72b2 (diff) | |
download | src-test2-39e77c4c504c5e2f28437f9f932825861534fc30.tar.gz src-test2-39e77c4c504c5e2f28437f9f932825861534fc30.zip |
Notes
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 193989991464..613f30d875a5 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4153,9 +4153,9 @@ kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, int error, eofflag; AUDIT_ARG_FD(fd); - auio.uio_resid = count; - if (auio.uio_resid > IOSIZE_MAX) + if (count > IOSIZE_MAX) return (EINVAL); + auio.uio_resid = count; if ((error = getvnode(td->td_proc->p_fd, fd, CAP_READ | CAP_SEEK, &fp)) != 0) return (error); |