Commit:    ef7286a42f0d85cc359f1d64678f859d6c3f832e
Author:    Xinchen Hui <larue...@php.net>         Sat, 28 Jul 2012 00:50:45 
+0800
Parents:   5799ebdb0cafb2de1dbb18cfe780976c98dbaeac
Branches:  PHP-5.3

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=ef7286a42f0d85cc359f1d64678f859d6c3f832e

Log:
Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK with 
run-test.php)

It's not a big deal, just because lexer will read the char after cursor before 
leaving

Bugs:
https://bugs.php.net/60194

Changed paths:
  M  NEWS
  M  Zend/zend_language_scanner.c
  M  Zend/zend_language_scanner.l
  M  Zend/zend_language_scanner_defs.h


Diff:
diff --git a/NEWS b/NEWS
index 8f55123..5aa35d7 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP                                                            
            NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2012, PHP 5.3.16
 
+- Core:
+  . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
+    with run-test.php). (Laruence)
+
 - CURL:
   . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
     (r.hampartsum...@gmail.com, Laruence)
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 1d0ada7..e3fc576 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Feb 15 17:38:31 2012 */
+/* Generated by re2c 0.13.5 on Sat Jul 28 00:45:37 2012 */
 #line 1 "Zend/zend_language_scanner.l"
 /*
    +----------------------------------------------------------------------+
@@ -287,7 +287,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle 
*file_handle TSRMLS_DC)
                zend_multibyte_set_filter(NULL TSRMLS_CC);
 
                if (!SCNG(input_filter)) {
-                       SCNG(script_filtered) = (unsigned 
char*)emalloc(SCNG(script_org_size)+1);
+                       SCNG(script_filtered) = (unsigned 
char*)emalloc(SCNG(script_org_size)+2);
                        memcpy(SCNG(script_filtered), SCNG(script_org), 
SCNG(script_org_size)+1);
                        SCNG(script_filtered_size) = SCNG(script_org_size);
                } else {
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 9b2e453..2661627 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -285,7 +285,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle 
*file_handle TSRMLS_DC)
                zend_multibyte_set_filter(NULL TSRMLS_CC);
 
                if (!SCNG(input_filter)) {
-                       SCNG(script_filtered) = (unsigned 
char*)emalloc(SCNG(script_org_size)+1);
+                       SCNG(script_filtered) = (unsigned 
char*)emalloc(SCNG(script_org_size)+2);
                        memcpy(SCNG(script_filtered), SCNG(script_org), 
SCNG(script_org_size)+1);
                        SCNG(script_filtered_size) = SCNG(script_org_size);
                } else {
diff --git a/Zend/zend_language_scanner_defs.h 
b/Zend/zend_language_scanner_defs.h
index adaedcf..d1955a8 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Feb 15 17:38:31 2012 */
+/* Generated by re2c 0.13.5 on Sat Jul 28 00:45:37 2012 */
 #line 3 "Zend/zend_language_scanner_defs.h"
 
 enum YYCONDTYPE {


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

Reply via email to