Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c

2012-02-23 Thread Pierre Joye
hi!

Thanks for applying the patch!

Please add the test case as well.

Btw, did you check with Stas and David about 5.4? Not sure if it is OK
at this stage, but we may need another RC already anyway (commits done
since last RC).

On Thu, Feb 23, 2012 at 2:26 AM, Scott MacVicar scott...@php.net wrote:
 scottmac                                 Thu, 23 Feb 2012 01:26:46 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323440

 Log:
 Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).

 Bug: https://bugs.php.net/61124 (Assigned) Segmentation fault

 Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
    U   php/php-src/trunk/ext/openssl/openssl.c

 Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2012-02-22 23:42:18 
 UTC (rev 323439)
 +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c  2012-02-23 01:26:46 
 UTC (rev 323440)
 @@ -4776,6 +4776,10 @@

        if (!raw_input) {
                base64_str = (char*)php_base64_decode((unsigned char*)data, 
 data_len, base64_str_len);
 +               if (!base64_str) {
 +                       php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed 
 to base64 decode the input);
 +                       RETURN_FALSE;
 +               }
                data_len = base64_str_len;
                data = base64_str;
        }

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2012-02-22 23:42:18 UTC (rev 323439)
 +++ php/php-src/branches/PHP_5_4/NEWS   2012-02-23 01:26:46 UTC (rev 323440)
 @@ -1,6 +1,9 @@
  PHP                                                                        
 NEWS
  |||
  ?? ??? 2012, PHP 5.4.0 RC 9
 +- OpenSSL:
 +  . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).
 +    (me at ktamura dot com, Scott)

  15 Feb 2012, PHP 5.4.0 RC 8
  - Core:

 Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2012-02-22 23:42:18 
 UTC (rev 323439)
 +++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c  2012-02-23 01:26:46 
 UTC (rev 323440)
 @@ -4803,6 +4803,10 @@

        if (!(options  OPENSSL_RAW_DATA)) {
                base64_str = (char*)php_base64_decode((unsigned char*)data, 
 data_len, base64_str_len);
 +               if (!base64_str) {
 +                       php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed 
 to base64 decode the input);
 +                       RETURN_FALSE;
 +               }
                data_len = base64_str_len;
                data = base64_str;
        }

 Modified: php/php-src/trunk/ext/openssl/openssl.c
 ===
 --- php/php-src/trunk/ext/openssl/openssl.c     2012-02-22 23:42:18 UTC (rev 
 323439)
 +++ php/php-src/trunk/ext/openssl/openssl.c     2012-02-23 01:26:46 UTC (rev 
 323440)
 @@ -4799,6 +4799,10 @@

        if (!(options  OPENSSL_RAW_DATA)) {
                base64_str = (char*)php_base64_decode((unsigned char*)data, 
 data_len, base64_str_len);
 +               if (!base64_str) {
 +                       php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed 
 to base64 decode the input);
 +                       RETURN_FALSE;
 +               }
                data_len = base64_str_len;
                data = base64_str;
        }


 --
 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_3/ NEWS

2012-02-23 Thread Christopher Jones
sixd Thu, 23 Feb 2012 19:43:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323453

Log:
Relocate orphan line

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-02-23 18:43:05 UTC (rev 323452)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-02-23 19:43:38 UTC (rev 323453)
@@ -242,9 +242,9 @@
 - Phar:
   . Fixed bug #60261 (NULL pointer dereference in phar). (Felipe)
   . Fixed bug #60164 (Stubs of a specific length break phar_open_from_fp
+scanning for __HALT_COMPILER). (Ralph Schindler)
   . Fixed bug #53872 (internal corruption of phar). (Hannes)
   . Fixed bug #52013 (Unable to decompress files in a compressed phar). 
(Hannes)
-scanning for __HALT_COMPILER). (Ralph Schindler)

 - PHP-FPM SAPI:
   . Fixed bug #60659 (FPM does not clear auth_user on request accept).

-- 
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/phar/phar_object.c trunk/ext/phar/phar_object.c

2012-02-23 Thread Christopher Jones



On 02/18/2012 05:39 AM, Nikita Popov wrote:

nikicSat, 18 Feb 2012 13:39:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323330

Log:
Fix headers generated by phar

sapi_header_line.line_len is the length without null terminator, so one has to
take sizeof - 1. This fixes some test failures as the NUL bytes were causing
warnings.

Needs to be merged to 5.4.


Hi Nikita,

This fix deserves a bug report - which will also help as a reminder
for the 5.4 merge.  And it will also add value to NEWS, since people
will be able to find more information (via the bug report) than you
could put in a one line NEWS entry.

Chris

--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php