]> granicus.if.org Git - php/commitdiff
Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 11 Sep 2008 23:56:43 +0000 (23:56 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 11 Sep 2008 23:56:43 +0000 (23:56 +0000)
NEWS
ext/openssl/xp_ssl.c

diff --git a/NEWS b/NEWS
index fd79740484c4b2d04d88581f711b186db8fce9d7..563b6ef38b421eb561923352e39b996e857c35e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,9 +5,13 @@ PHP                                                                        NEWS
 - Changed error level E_ERROR into E_WARNING in Soap extension methods 
   parameter validation. (Felipe)
 
+- Fixed bug #46042 (memory leaks with reflection of mb_convert_encoding()).
+  (Ilia)
 - Fixed bug #45928 (large scripts from stdin are stripped at 16K border).
   (Christian Schneider, Arnaud)
 - Fixed bug #45911 (Cannot disable ext/hash). (Arnaud)
+- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
+  (vnegrier at optilian dot com, Ilia
 
 02 Sep 2008, PHP 5.3.0 Alpha 2
 - Removed special treatment of "/tmp" in sessions for open_basedir.
index 3beefb6d23c68c22673029942af10e70c5fe7f7e..30b66ee7822b33b029c614c0d07d86f38e84bce8 100644 (file)
@@ -417,7 +417,7 @@ static inline int php_openssl_enable_crypto(php_stream *stream,
                                n = SSL_connect(sslsock->ssl_handle);
                                gettimeofday(&tve, &tz);
 
-                               timeout -= (tve.tv_sec + tve.tv_usec / 1000000) - (tvs.tv_sec + tvs.tv_usec / 1000000);
+                               timeout -= (tve.tv_sec + (float) tve.tv_usec / 1000000) - (tvs.tv_sec + (float) tvs.tv_usec / 1000000);
                                if (timeout < 0) {
                                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL: connection timeout");
                                        return -1;