[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/openssl/xp_ssl.c PHP_5_4/ext/openssl/xp_ssl.c
shm Sat, 12 Nov 2011 10:36:55 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319095 Log: - Fixed NULL pointer dereference in stream_socket_enable_crypto, case when ssl_handle of session_stream is not initialized. Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c U php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c Modified: php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c === --- php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c 2011-11-12 08:57:13 UTC (rev 319094) +++ php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c 2011-11-12 10:36:55 UTC (rev 319095) @@ -406,6 +406,8 @@ if (cparam-inputs.session) { if (cparam-inputs.session-ops != php_openssl_socket_ops) { php_error_docref(NULL TSRMLS_CC, E_WARNING, supplied session stream must be an SSL enabled stream); + } else if (((php_openssl_netstream_data_t*)cparam-inputs.session-abstract)-ssl_handle == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, supplied SSL session stream is not initialized); } else { SSL_copy_session_id(sslsock-ssl_handle, ((php_openssl_netstream_data_t*)cparam-inputs.session-abstract)-ssl_handle); } Modified: php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c === --- php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c 2011-11-12 08:57:13 UTC (rev 319094) +++ php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c 2011-11-12 10:36:55 UTC (rev 319095) @@ -406,6 +406,8 @@ if (cparam-inputs.session) { if (cparam-inputs.session-ops != php_openssl_socket_ops) { php_error_docref(NULL TSRMLS_CC, E_WARNING, supplied session stream must be an SSL enabled stream); + } else if (((php_openssl_netstream_data_t*)cparam-inputs.session-abstract)-ssl_handle == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, supplied SSL session stream is not initialized); } else { SSL_copy_session_id(sslsock-ssl_handle, ((php_openssl_netstream_data_t*)cparam-inputs.session-abstract)-ssl_handle); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/openssl/xp_ssl.c PHP_5_4/ext/openssl/xp_ssl.c
On Sat, 2011-11-12 at 10:36 +, Mateusz Kocielski wrote: Log: - Fixed NULL pointer dereference in stream_socket_enable_crypto, case when ssl_handle of session_stream is not initialized. Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c U php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c I see this had been applied to trunk before. Any bug ID or other entry for NEWS? johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/openssl/xp_ssl.c PHP_5_4/ext/openssl/xp_ssl.c
#60279 2011/11/12 Johannes Schlüter johan...@schlueters.de: On Sat, 2011-11-12 at 10:36 +, Mateusz Kocielski wrote: Log: - Fixed NULL pointer dereference in stream_socket_enable_crypto, case when ssl_handle of session_stream is not initialized. Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c U php/php-src/branches/PHP_5_4/ext/openssl/xp_ssl.c I see this had been applied to trunk before. Any bug ID or other entry for NEWS? johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c
dsp Sat, 12 Nov 2011 17:05:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319102 Log: Fix #60218 (instantiating unknown class leads to memory leak in cli) Bug: https://bugs.php.net/60218 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c U php/php-src/trunk/Zend/zend_execute_API.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c === --- php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c2011-11-12 16:32:10 UTC (rev 319101) +++ php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c2011-11-12 17:05:08 UTC (rev 319102) @@ -1195,7 +1195,9 @@ } CG(interactive) = 0; - zend_execute(new_op_array TSRMLS_CC); + zend_try { + zend_execute(new_op_array TSRMLS_CC); + } zend_end_try(); CG(interactive) = orig_interactive; if (local_retval_ptr) { Modified: php/php-src/trunk/Zend/zend_execute_API.c === --- php/php-src/trunk/Zend/zend_execute_API.c 2011-11-12 16:32:10 UTC (rev 319101) +++ php/php-src/trunk/Zend/zend_execute_API.c 2011-11-12 17:05:08 UTC (rev 319102) @@ -1195,7 +1195,9 @@ } CG(interactive) = 0; - zend_execute(new_op_array TSRMLS_CC); + zend_try { + zend_execute(new_op_array TSRMLS_CC); + } zend_end_try(); CG(interactive) = orig_interactive; if (local_retval_ptr) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/standard/tests/strings/md5_file.phpt branches/PHP_5_4/ext/standard/tests/strings/sha1_file.phpt trunk/ext/standard/tests/strings/md5_file.phpt trunk/e
rasmus Sat, 12 Nov 2011 18:46:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319108 Log: Fix typo and don't use 'a' as an invalid filename since it is the default gcc binary filename and is thus not unlikely to be left lying around in the build dir which cause these tests to fail Changed paths: U php/php-src/branches/PHP_5_4/ext/standard/tests/strings/md5_file.phpt U php/php-src/branches/PHP_5_4/ext/standard/tests/strings/sha1_file.phpt U php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt U php/php-src/trunk/ext/standard/tests/strings/sha1_file.phpt Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/strings/md5_file.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/strings/md5_file.phpt 2011-11-12 18:39:15 UTC (rev 319107) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/strings/md5_file.phpt 2011-11-12 18:46:04 UTC (rev 319108) @@ -30,13 +30,13 @@ fclose($handle2); /* Testing error conditions */ -echo \n*** Testing foe error conditions ***\n; +echo \n*** Testing for error conditions ***\n; /* No filename */ var_dump( md5_file() ); /* invalid filename */ -var_dump( md5_file(a) ); +var_dump( md5_file(aZrq16u) ); /* Scalar value as filename */ var_dump( md5_file(12) ); @@ -73,12 +73,12 @@ echo \nDone; ? --EXPECTF-- -*** Testing foe error conditions *** +*** Testing for error conditions *** Warning: md5_file(): Filename cannot be empty in %s on line %d bool(false) -Warning: md5_file(a): failed to open stream: No such file or directory in %s on line %d +Warning: md5_file(aZrq16u): failed to open stream: No such file or directory in %s on line %d bool(false) Warning: md5_file(12): failed to open stream: No such file or directory in %s on line %d Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/strings/sha1_file.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/strings/sha1_file.phpt 2011-11-12 18:39:15 UTC (rev 319107) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/strings/sha1_file.phpt 2011-11-12 18:46:04 UTC (rev 319108) @@ -38,7 +38,7 @@ var_dump( sha1_file() ); echo \n-- invalid filename --\n; -var_dump( sha1_file(a) ); +var_dump( sha1_file(rewncwYcn89q) ); echo \n-- Scalar value as filename --\n; var_dump( sha1_file(12) ); @@ -82,7 +82,7 @@ -- invalid filename -- -Warning: sha1_file(a): failed to open stream: No such file or directory in %s on line %d +Warning: sha1_file(rewncwYcn89q): failed to open stream: No such file or directory in %s on line %d bool(false) -- Scalar value as filename -- Modified: php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt === --- php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt 2011-11-12 18:39:15 UTC (rev 319107) +++ php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt 2011-11-12 18:46:04 UTC (rev 319108) @@ -30,13 +30,13 @@ fclose($handle2); /* Testing error conditions */ -echo \n*** Testing foe error conditions ***\n; +echo \n*** Testing for error conditions ***\n; /* No filename */ var_dump( md5_file() ); /* invalid filename */ -var_dump( md5_file(a) ); +var_dump( md5_file(aZrq16u) ); /* Scalar value as filename */ var_dump( md5_file(12) ); @@ -73,12 +73,12 @@ echo \nDone; ? --EXPECTF-- -*** Testing foe error conditions *** +*** Testing for error conditions *** Warning: md5_file(): Filename cannot be empty in %s on line %d bool(false) -Warning: md5_file(a): failed to open stream: No such file or directory in %s on line %d +Warning: md5_file(aZrq16u): failed to open stream: No such file or directory in %s on line %d bool(false) Warning: md5_file(12): failed to open stream: No such file or directory in %s on line %d Modified: php/php-src/trunk/ext/standard/tests/strings/sha1_file.phpt === --- php/php-src/trunk/ext/standard/tests/strings/sha1_file.phpt 2011-11-12 18:39:15 UTC (rev 319107) +++ php/php-src/trunk/ext/standard/tests/strings/sha1_file.phpt 2011-11-12 18:46:04 UTC (rev 319108) @@ -38,7 +38,7 @@ var_dump( sha1_file() ); echo \n-- invalid filename --\n; -var_dump( sha1_file(a) ); +var_dump( sha1_file(rewncwYcn89q) ); echo \n-- Scalar value as filename --\n; var_dump( sha1_file(12) ); @@ -82,7 +82,7 @@ -- invalid filename -- -Warning: sha1_file(a): failed to open stream: No such file or directory in %s on line %d +Warning: sha1_file(rewncwYcn89q): failed to open stream: No such file or directory in %s on line %d bool(false) -- Scalar value as filename -- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/standard/tests/streams/bug49936.phpt trunk/ext/standard/tests/streams/bug49936.phpt
rasmus Sat, 12 Nov 2011 19:12:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319110 Log: Fix test Changed paths: U php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug49936.phpt U php/php-src/trunk/ext/standard/tests/streams/bug49936.phpt Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug49936.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug49936.phpt 2011-11-12 18:55:44 UTC (rev 319109) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug49936.phpt 2011-11-12 19:12:39 UTC (rev 319110) @@ -15,12 +15,9 @@ ? --EXPECTF-- -Warning: opendir(): connect() failed: Connection refused in %s on line %d - -Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d +Warning: opendir(ftp://...@localhost/): failed to open dir: not implemented in %s on line %d bool(false) -Warning: opendir(): connect() failed: Connection refused in %s on line %d - -Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d +Warning: opendir(ftp://...@localhost/): failed to open dir: not implemented in %s on line %d bool(false) + Modified: php/php-src/trunk/ext/standard/tests/streams/bug49936.phpt === --- php/php-src/trunk/ext/standard/tests/streams/bug49936.phpt 2011-11-12 18:55:44 UTC (rev 319109) +++ php/php-src/trunk/ext/standard/tests/streams/bug49936.phpt 2011-11-12 19:12:39 UTC (rev 319110) @@ -15,12 +15,8 @@ ? --EXPECTF-- -Warning: opendir(): connect() failed: Connection refused in %s on line %d - -Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d +Warning: opendir(ftp://...@localhost/): failed to open dir: not implemented in %s on line %d bool(false) -Warning: opendir(): connect() failed: Connection refused in %s on line %d - -Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d +Warning: opendir(ftp://...@localhost/): failed to open dir: not implemented in %s on line %d bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/main/output.c branches/PHP_5_4/tests/output/bug60282.phpt trunk/main/output.c trunk/tests/output/bug60282.phpt
laruence Sun, 13 Nov 2011 04:11:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319117 Log: Fixed bug #60282 (Segfault when using ob_gzhandler() with open buffers) Bug: https://bugs.php.net/60282 (Assigned) Segfault when using ob_gzhandler() with open buffers Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/main/output.c A php/php-src/branches/PHP_5_4/tests/output/bug60282.phpt U php/php-src/trunk/main/output.c A php/php-src/trunk/tests/output/bug60282.phpt Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-11-12 23:01:24 UTC (rev 319116) +++ php/php-src/branches/PHP_5_4/NEWS 2011-11-13 04:11:57 UTC (rev 319117) @@ -10,6 +10,10 @@ . Fixed bug #59985 (show normal warning text for OCI_NO_DATA) (Chris Jones) +- Output: + . Fixed bug #60282 (Segfault when using ob_gzhandler() with open buffers). +(Laruence) + 11 Nov 2011, PHP 5.4.0 RC1 - General improvements: . Changed silent conversion of array to string to produce a notice. (Patrick) Modified: php/php-src/branches/PHP_5_4/main/output.c === --- php/php-src/branches/PHP_5_4/main/output.c 2011-11-12 23:01:24 UTC (rev 319116) +++ php/php-src/branches/PHP_5_4/main/output.c 2011-11-13 04:11:57 UTC (rev 319117) @@ -508,14 +508,14 @@ * Check whether a certain output handler is in use */ PHPAPI int php_output_handler_started(const char *name, size_t name_len TSRMLS_DC) { - php_output_handler **handlers; + php_output_handler ***handlers; int i, count = php_output_get_level(TSRMLS_C); if (count) { - handlers = *(php_output_handler ***) zend_stack_base(OG(handlers)); + handlers = (php_output_handler ***) zend_stack_base(OG(handlers)); for (i = 0; i count; ++i) { - if (name_len == handlers[i]-name_len !memcmp(handlers[i]-name, name, name_len)) { + if (name_len == (*(handlers[i]))-name_len !memcmp((*(handlers[i]))-name, name, name_len)) { return 1; } } Added: php/php-src/branches/PHP_5_4/tests/output/bug60282.phpt === --- php/php-src/branches/PHP_5_4/tests/output/bug60282.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/tests/output/bug60282.phpt 2011-11-13 04:11:57 UTC (rev 319117) @@ -0,0 +1,10 @@ +--TEST-- +Bug #60282 (Segfault when using ob_gzhandler() with open buffers) +--FILE-- +?php +ob_start(); +ob_start(); +ob_start('ob_gzhandler'); +echo done; +--EXPECT-- +done Modified: php/php-src/trunk/main/output.c === --- php/php-src/trunk/main/output.c 2011-11-12 23:01:24 UTC (rev 319116) +++ php/php-src/trunk/main/output.c 2011-11-13 04:11:57 UTC (rev 319117) @@ -508,14 +508,14 @@ * Check whether a certain output handler is in use */ PHPAPI int php_output_handler_started(const char *name, size_t name_len TSRMLS_DC) { - php_output_handler **handlers; + php_output_handler ***handlers; int i, count = php_output_get_level(TSRMLS_C); if (count) { - handlers = *(php_output_handler ***) zend_stack_base(OG(handlers)); + handlers = (php_output_handler ***) zend_stack_base(OG(handlers)); for (i = 0; i count; ++i) { - if (name_len == handlers[i]-name_len !memcmp(handlers[i]-name, name, name_len)) { + if (name_len == (*(handlers[i]))-name_len !memcmp((*(handlers[i]))-name, name, name_len)) { return 1; } } Added: php/php-src/trunk/tests/output/bug60282.phpt === --- php/php-src/trunk/tests/output/bug60282.phpt (rev 0) +++ php/php-src/trunk/tests/output/bug60282.phpt2011-11-13 04:11:57 UTC (rev 319117) @@ -0,0 +1,10 @@ +--TEST-- +Bug #60282 (Segfault when using ob_gzhandler() with open buffers) +--FILE-- +?php +ob_start(); +ob_start(); +ob_start('ob_gzhandler'); +echo done; +--EXPECT-- +done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php