summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2012-09-22 10:18:44 -0400
committerPierrick Charron <pierrick@php.net>2012-09-22 10:18:44 -0400
commitc8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a (patch)
tree3d55d54fd62a0f292ac43685e0f72d52f5bc3718 /ext/curl/multi.c
parent734bda7a2ddea53293eb8abdb9842a0079d54a53 (diff)
parent2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010 (diff)
downloadphp-git-c8687ee63b0aa0cbe8da1e8d5c65a338eb69f83a.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Avoid calling select if maxfd returned by curl_multi_fdset is -1
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 034aa65c28..53e97b80f8 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));
}
/* }}} */