summaryrefslogtreecommitdiff
path: root/lib/select.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-09-25 17:34:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-09-25 17:34:12 +0200
commit2d6796aac51d8a5963f552b8fa23a2396a987913 (patch)
treeb67ad0bdad0d0601b454fdf5741422319e43afd7 /lib/select.c
parentbb94b92894eef5d62d9b19b39cf5af921ee5fd2d (diff)
downloadcurl-2d6796aac51d8a5963f552b8fa23a2396a987913.tar.gz
curl_multi_fdset: avoid FD_SET out of bounds
If a socket is larger than FD_SETSIZE, avoid using FD_SET() on the platforms where this is possible. Bug: http://curl.haxx.se/bug/view.cgi?id=3413274 Reported by: Tim Starling
Diffstat (limited to 'lib/select.c')
-rw-r--r--lib/select.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/select.c b/lib/select.c
index 79475d539..6cecbf701 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -46,20 +46,6 @@
#include "select.h"
#include "warnless.h"
-/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1] */
-
-#if defined(USE_WINSOCK) || defined(TPF)
-#define VERIFY_SOCK(x) Curl_nop_stmt
-#else
-#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
-#define VERIFY_SOCK(x) do { \
- if(!VALID_SOCK(x)) { \
- SET_SOCKERRNO(EINVAL); \
- return -1; \
- } \
-} WHILE_FALSE
-#endif
-
/* Convenience local macros */
#define elapsed_ms (int)curlx_tvdiff(curlx_tvnow(), initial_tv)