* lib/poll.c (poll) [WINDOWS_NATIVE]: Check value of nfd correctly.
Reported by Paul Eggert.
+2017-04-22 Bruno Haible <bruno@clisp.org>
+
+ poll: Enable argument check also in the Windows implementation.
+ * lib/poll.c (poll) [WINDOWS_NATIVE]: Check value of nfd correctly.
+ Reported by Paul Eggert.
+
2017-04-22 Bruno Haible <bruno@clisp.org>
getlogin_r: Work around bug in Mac OS X 10.12.
int rc = 0;
nfds_t i;
- if (nfd < 0 || timeout < -1)
+ if (nfd > TYPE_MAXIMUM (nfds_t) / 2 || timeout < -1)
{
errno = EINVAL;
return -1;