diff options
-rw-r--r-- | sys/kern/vfs_syscalls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 198009d..4d3978a 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4069,6 +4069,8 @@ kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, int error, eofflag; AUDIT_ARG(fd, fd); + if (count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { |