* 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

@ -1,3 +1,7 @@
2014-04-23 Corinna Vinschen <corinna@vinschen.de>
* miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value.
2014-04-22 Corinna Vinschen <corinna@vinschen.de>
* ldap.cc (user_attr): Remove "uid" attribute.

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;

View File

@ -19,3 +19,6 @@ Bug Fixes
- Workaround a problem following native symlinks.
Fixes: http://cygwin.com/ml/cygwin/2014-04/msg00384.html
- Fix calls to readv/writev/recvmsg/sendmsg with 0 iovlen.
Fixes: http://cygwin.com/ml/cygwin/2014-04/msg00509.html