* lib/poll.c: Include intprops.h.
(poll): Check value of nfd correctly.
* modules/poll (Depends-on): Add intprops.
+2017-04-22 Bruno Haible <bruno@clisp.org>
+
+ poll: Enable argument check.
+ * lib/poll.c: Include intprops.h.
+ (poll): Check value of nfd correctly.
+ * modules/poll (Depends-on): Add intprops.
+
2017-04-22 Bruno Haible <bruno@clisp.org>
get-rusage-data: Avoid warnings on Mac OS X.
#include <time.h>
#include "assure.h"
+#include "intprops.h"
#ifndef INFTIM
# define INFTIM (-1)
int maxfd, rc;
nfds_t i;
- if (nfd < 0)
+ if (nfd > TYPE_MAXIMUM (nfds_t) / 2)
{
errno = EINVAL;
return -1;
poll-h
alloca [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
assure [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
+intprops [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
select [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
sockets [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
sys_select [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]