summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorPeter Holm <pho@FreeBSD.org>2012-03-09 21:31:12 +0000
committerPeter Holm <pho@FreeBSD.org>2012-03-09 21:31:12 +0000
commit39e77c4c504c5e2f28437f9f932825861534fc30 (patch)
tree06525bf28d8d4985fc96a000b76e7774e154b90c /sys/kern/vfs_syscalls.c
parent24c8f29cf474e4028cb9aeb7215795fd421d72b2 (diff)
downloadsrc-test2-39e77c4c504c5e2f28437f9f932825861534fc30.tar.gz
src-test2-39e77c4c504c5e2f28437f9f932825861534fc30.zip
Notes
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c4
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);