summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2012-09-22 10:19:16 -0400
committerPierrick Charron <pierrick@php.net>2012-09-22 10:19:16 -0400
commit6c135dff975f111ec5a84af93c1b98e9ae84fcd1 (patch)
tree668e964844e20dd1f02efaa4a05c99d6402ea6a7 /ext/curl/multi.c
parent70713a27b69962126a8e75caf01c88db96a542e3 (diff)
parentc8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a (diff)
downloadphp-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.c3
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));
}
/* }}} */