mirror of
https://github.com/mirror/wget.git
synced 2025-03-09 09:10:17 +08:00
* src/connect.c (select_fd): Check for negative fd
This commit is contained in:
parent
823a9c8e0d
commit
a255d9f0c8
@ -686,6 +686,9 @@ select_fd (int fd, double maxtime, int wait_for)
|
||||
struct timeval tmout;
|
||||
int result;
|
||||
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
if (fd >= FD_SETSIZE)
|
||||
{
|
||||
logprintf (LOG_NOTQUIET, _("Too many fds open. Cannot use select on a fd >= %d\n"), FD_SETSIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user