bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: poll: enable argument check


From: Paul Eggert
Subject: Re: poll: enable argument check
Date: Sat, 22 Apr 2017 14:31:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Bruno Haible wrote:
-  if (nfd < 0)
+  if (nfd > TYPE_MAXIMUM (nfds_t) / 2)

This doesn't look right. What does TYPE_MAXIMUM (nfds_t) / 2 have to do with anything? Plus, five lines later there's a comment that starts "Don't check directly for NFD too large" and this seems to directly contradict the code now. Plus, there's another "nfd < 0" in the WINDOWS_NATIVE case.

How about the attached patch?

Attachment: poll.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]