cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c /ext/pcre/tests bug47662.phpt
| From: | Nuno Lopes | Date: | Tue, 14 Apr 2009 20:31:32 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c /ext/pcre/tests bug47662.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57017@lists.php.net to get a copy of this message | ||
nlopess Tue Apr 14 20:31:32 2009 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/pcre/tests bug47662.phpt
Modified files:
/php-src/ext/pcre php_pcre.c
Log:
MFH: fix bug #47662: support more than 127 named subpatterns
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.30&r2=1.168.2.9.2.31&diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.30 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.31
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.30 Tue Jan 13 19:23:31 2009
+++ php-src/ext/pcre/php_pcre.c Tue Apr 14 20:31:31 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.168.2.9.2.30 2009/01/13 19:23:31 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.31 2009/04/14 20:31:31 nlopess Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -209,7 +209,7 @@
}
while (ni++ < name_cnt) {
- name_idx = 0xff * name_table[0] + name_table[1];
+ name_idx = 0xff * (unsigned char)name_table[0] + (unsigned char)name_table[1];
subpat_names[name_idx] = name_table + 2;
if (is_numeric_string(subpat_names[name_idx], strlen(subpat_names[name_idx]), NULL, NULL, 0)
> 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric named subpatterns are not
allowed");
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47662.phpt?view=markup&rev=1.1
Index: php-src/ext/pcre/tests/bug47662.phpt
+++ php-src/ext/pcre/tests/bug47662.phpt