* src/connect.c (select_fd): Check for negative fd

This commit is contained in:
Tim Rühsen 2019-05-06 16:45:11 +02:00
parent 823a9c8e0d
commit a255d9f0c8

View File

@ -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);