From: Joe Orton Date: Tue, 8 Apr 2008 14:11:49 +0000 (+0000) Subject: MFH: Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build) X-Git-Tag: php-5.2.6RC5~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8611785073d3562910bb92304a6c701306aaadd9;p=php MFH: Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build) (stotty at tvnet dot hu) MFH: Fix another case of a broken stream->fd cast in 64-bit builds. --- diff --git a/NEWS b/NEWS index ffd0fbaa7b..091d70f303 100644 --- 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) diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index cd55389eeb..50dbbb911a 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -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: diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 0efefc633f..c830dda086 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -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: