com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/pcre/php_pcre.c
| From: | Christoph Michael Becker | Date: | Wed, 27 Jul 2016 17:00:38 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/pcre/php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93424@lists.php.net to get a copy of this message | ||
Commit: 40afd77826e19023df3f095525956f713bf0d96f
Author: Christoph M. Becker <cmb@php.net> Wed, 27 Jul 2016 18:59:40 +0200
Parents: 5513f00a972d1781349035cc097971fb9056cce1 315c0536c20619478fc548b782132cd65286018f
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=40afd77826e19023df3f095525956f713bf0d96f
Log:
Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
# ext/pcre/php_pcre.c
Changed paths:
MM NEWS
MM ext/pcre/php_pcre.c
Diff:
diff --cc NEWS
index 36f5f69,204defd...322ff78
--- a/NEWS
+++ b/NEWS
@@@ -51,15 -40,11 +51,18 @@@ PH
.. Fixed bug #68712 (suspicious if-else statements). (cmb)
- Intl:
+ . Fixed bug #72639 (Segfault when instantiating class that extends
+ IntlCalendar and adds a property). (Laruence)
. Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain
names). (cmb)
-- PCRE:
+
+- Opcache:
+ . Fixed bug #72590 (Opcache restart with kill_all_lockers does not work).
+ (Keyur)
+
++-PCRE:
+ . Fixed bug #72688 (preg_match missing group names in matches). (cmb)
+
- PDO_pgsql:
. Fixed bug #70313 (PDO statement fails to throw exception). (Matteo)
diff --cc ext/pcre/php_pcre.c
index 3d59b77,ddc5d76..fe6b7b3
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@@ -248,23 -194,22 +248,23 @@@ static char **make_subpats_table(int nu
int rc;
char *name_table;
unsigned short name_idx;
- char **subpat_names = (char **)ecalloc(num_subpats, sizeof(char *));
+ char **subpat_names;
+ int rc1, rc2;
- rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMECOUNT, &name_cnt);
+ rc1 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMETABLE, &name_table);
+ rc2 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMEENTRYSIZE, &name_size);
+ rc = rc2 ? rc2 : rc1;
if (rc < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal pcre_fullinfo() error %d", rc);
- efree(subpat_names);
+ php_error_docref(NULL, E_WARNING, "Internal pcre_fullinfo() error %d", rc);
return NULL;
}
- if (name_cnt > 0) {
- int rc1, rc2;
- rc1 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMETABLE, &name_table);
- rc2 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMEENTRYSIZE, &name_size);
- rc = rc2 ? rc2 : rc1;
- if (rc < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal pcre_fullinfo() error %d", rc);
+ subpat_names = (char **)ecalloc(num_subpats, sizeof(char *));
+ while (ni++ < name_cnt) {
- name_idx = 0xff * (unsigned char)name_table[0] + (unsigned char)name_table[1];
++ name_idx = 0x100 * (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, E_WARNING, "Numeric named subpatterns are not allowed");
efree(subpat_names);
return NULL;
}