mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
Curl_socket_check: enlarge poll struct array to 3
This function was introduced in commit 5527417afa
and as pointed out
by Gokhan Sengun, the array with poll structs must large enough to hold
3 sockets since that is what the function can accept. It could be noted
that he had this fixed in his patch as posted in
http://curl.haxx.se/mail/lib-2011-12/0179.html
Bug: http://curl.haxx.se/mail/lib-2011-12/0228.html
Reported by: Gokhan Sengun
This commit is contained in:
parent
3d6e2ec925
commit
926916e28e
@ -153,7 +153,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
|
|||||||
long timeout_ms) /* milliseconds to wait */
|
long timeout_ms) /* milliseconds to wait */
|
||||||
{
|
{
|
||||||
#ifdef HAVE_POLL_FINE
|
#ifdef HAVE_POLL_FINE
|
||||||
struct pollfd pfd[2];
|
struct pollfd pfd[3];
|
||||||
int num;
|
int num;
|
||||||
#else
|
#else
|
||||||
struct timeval pending_tv;
|
struct timeval pending_tv;
|
||||||
|
Loading…
Reference in New Issue
Block a user