diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-09-25 17:34:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-09-25 17:34:12 +0200 |
commit | 2d6796aac51d8a5963f552b8fa23a2396a987913 (patch) | |
tree | b67ad0bdad0d0601b454fdf5741422319e43afd7 /docs | |
parent | bb94b92894eef5d62d9b19b39cf5af921ee5fd2d (diff) | |
download | curl-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 'docs')
-rw-r--r-- | docs/libcurl/curl_multi_fdset.3 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3 index fadc53812..bdb389f26 100644 --- a/docs/libcurl/curl_multi_fdset.3 +++ b/docs/libcurl/curl_multi_fdset.3 @@ -53,6 +53,14 @@ When doing select(), you should use \fBcurl_multi_timeout\fP to figure out how long to wait for action. Call \fIcurl_multi_perform\fP even if no activity has been seen on the fd_sets after the timeout expires as otherwise internal retries and timeouts may not work as you'd think and want. + +If one of the sockets used by libcurl happens to be larger than what can be +set in an fd_set, which on POSIX systems means that the file descriptor is +larger than FD_SETSIZE, then libcurl will try to not set it. Setting a too +large file descriptor in an fd_set implies an out of bounds write which can +cause crashes, or worse. The effect of NOT storing it will possibly save you +from the crash, but will make your program NOT wait for sockets it should wait +for... .SH RETURN VALUE CURLMcode type, general libcurl multi interface error code. See \fIlibcurl-errors(3)\fP |