diff options
author | Ian Dowse <iedowse@FreeBSD.org> | 2001-08-10 22:14:18 +0000 |
---|---|---|
committer | Ian Dowse <iedowse@FreeBSD.org> | 2001-08-10 22:14:18 +0000 |
commit | a9a8ba3d71317f7b24ad9e1ab0b23239e1057669 (patch) | |
tree | d5f2f288f3f2ffff27a1098615cf2ec1edba15a5 /sys/kern/vfs_syscalls.c | |
parent | f34a9421b1b8a38c5767ee013641b2ea4581ddc6 (diff) | |
download | src-test2-a9a8ba3d71317f7b24ad9e1ab0b23239e1057669.tar.gz src-test2-a9a8ba3d71317f7b24ad9e1ab0b23239e1057669.zip |
Notes
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 35f9576c42ec..187727f87b97 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3059,6 +3059,9 @@ ogetdirentries(p, uap) int error, eofflag, readcnt; long loff; + /* XXX arbitrary sanity limit on `count'. */ + if (SCARG(uap, count) > 64 * 1024) + return (EINVAL); if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) |