diff options
author | Pierrick Charron <pierrick@php.net> | 2012-09-22 10:19:16 -0400 |
---|---|---|
committer | Pierrick Charron <pierrick@php.net> | 2012-09-22 10:19:16 -0400 |
commit | 6c135dff975f111ec5a84af93c1b98e9ae84fcd1 (patch) | |
tree | 668e964844e20dd1f02efaa4a05c99d6402ea6a7 /ext/curl/multi.c | |
parent | 70713a27b69962126a8e75caf01c88db96a542e3 (diff) | |
parent | c8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a (diff) | |
download | php-git-6c135dff975f111ec5a84af93c1b98e9ae84fcd1.tar.gz |
Merge branch 'PHP-5.4'
* PHP-5.4:
Avoid calling select if maxfd returned by curl_multi_fdset is -1
Fixing NEWS file
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r-- | ext/curl/multi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index bdf7166306..eedcb6abc3 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -191,6 +191,9 @@ PHP_FUNCTION(curl_multi_select) FD_ZERO(&exceptfds); curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd); + if (maxfd == -1) { + RETURN_LONG(-1); + } RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to)); } /* }}} */ |