* miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value.

This commit is contained in:
Corinna Vinschen
2014-04-23 15:26:14 +00:00
parent 742e729664
commit ef7e42ec0f
3 changed files with 8 additions and 1 deletions

View File

@@ -196,7 +196,7 @@ dummytest (volatile char *p)
ssize_t
check_iovec (const struct iovec *iov, int iovcnt, bool forwrite)
{
if (iovcnt <= 0 || iovcnt > IOV_MAX)
if (iovcnt < 0 || iovcnt > IOV_MAX)
{
set_errno (EINVAL);
return -1;