1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Allowing nent < 0 in aio_suspend() and lio_listio() is just asking for

trouble. Return EINVAL instead.
This commit is contained in:
Tim J. Robbins 2003-01-12 09:40:23 +00:00
parent 44a2c818de
commit ae3b195fcf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109137

View File

@ -1612,7 +1612,7 @@ aio_suspend(struct thread *td, struct aio_suspend_args *uap)
long *ijoblist;
struct aiocb **ujoblist;
if (uap->nent > AIO_LISTIO_MAX)
if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX)
return EINVAL;
timo = 0;
@ -1946,7 +1946,7 @@ lio_listio(struct thread *td, struct lio_listio_args *uap)
return EINVAL;
nent = uap->nent;
if (nent > AIO_LISTIO_MAX)
if (nent < 0 || nent > AIO_LISTIO_MAX)
return EINVAL;
if (p->p_aioinfo == NULL)