]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build)
authorJoe Orton <jorton@php.net>
Tue, 8 Apr 2008 14:11:49 +0000 (14:11 +0000)
committerJoe Orton <jorton@php.net>
Tue, 8 Apr 2008 14:11:49 +0000 (14:11 +0000)
   (stotty at tvnet dot hu)
MFH: Fix another case of a broken stream->fd cast in 64-bit builds.

NEWS
ext/openssl/xp_ssl.c
ext/soap/php_http.c

diff --git a/NEWS b/NEWS
index ffd0fbaa7b363b1947e396f4b72dedae84cfbb73..091d70f3035698fc9f579d5a7a0620d0dfde1e95 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP                                                                        NEWS
 - Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb'
   correctly). (Jani)
 - Fixed bug #44591 (imagegif's filename parameter). (Felipe)
+- Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build)
+  (stotty at tvnet dot hu)
 
 03 Apr 2008, PHP 5.2.6RC4
 - Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin)
index cd55389eeb9678875b0ac4c71c6b8f7d11d92f11..50dbbb911ab0c233000a15db0b92fab49552a3ed 100644 (file)
@@ -728,7 +728,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
 
                case PHP_STREAM_AS_FD_FOR_SELECT:
                        if (ret) {
-                               *ret = (void*)sslsock->s.socket;
+                               *(int *)ret = sslsock->s.socket;
                        }
                        return SUCCESS;
 
@@ -738,7 +738,7 @@ static int php_openssl_sockop_cast(php_stream *stream, int castas, void **ret TS
                                return FAILURE;
                        }
                        if (ret) {
-                               *ret = (void*)sslsock->s.socket;
+                               *(int *)ret = sslsock->s.socket;
                        }
                        return SUCCESS;
                default:
index 0efefc633f59fb01c84656175b1ce07758b7827c..c830dda086ff3fe4836d7a444cf01aaf5e9b00b9 100644 (file)
@@ -33,7 +33,7 @@ static int get_http_headers(php_stream *socketd,char **response, int *out_size T
 
 static int stream_alive(php_stream *stream  TSRMLS_DC)
 {
-       long socket;
+       int socket;
        char buf;
 
        /* maybe better to use: