summaryrefslogtreecommitdiff
path: root/resolv/res_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r--resolv/res_send.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 60d8ef2fb9..cde6a845d5 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -601,6 +601,11 @@ read_len:
if ((long) timeout.tv_sec <= 0)
timeout.tv_sec = 1;
timeout.tv_usec = 0;
+ if (s+1 > FD_SETSIZE) {
+ Perror(stderr, "s+1 > FD_SETSIZE", EMFILE);
+ res_close();
+ goto next_ns;
+ }
wait:
FD_ZERO(&dsmask);
FD_SET(s, &dsmask);