com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/mbstring/php_mbregex.c

From: Date: Sat, 30 Jul 2016 10:01:29 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/mbstring/php_mbregex.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93484@lists.php.net to get a copy of this message
Commit: e5940aa7950effe1835e489024b840fb87f54a3c Author: Christoph M. Becker <cmb@php.net> Sat, 30 Jul 2016 11:49:19 +0200 Parents: 8a442a33c319a9663212e732dda4cd717d4efff6 1d32b809034ea4cd0e765ae9fda6ca16ae045fdd Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5940aa7950effe1835e489024b840fb87f54a3c Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS MM ext/mbstring/php_mbregex.c Diff: diff --cc NEWS index cb66a0b,49d6c32..babe2c2 --- a/NEWS +++ b/NEWS @@@ -71,14 -54,11 +71,16 @@@ PH zero-width). (cmb) . Fixed bug #72694 (mb_ereg_search_setpos does not accept a string's last position). (cmb) + . Fixed bug #72710 (mb_ereg causes buffer overflow on regexp compile error). + (ju1ius) +- 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) + . Upgraded to PCRE 8.39. (Anatol) - PDO_pgsql: . Fixed bug #70313 (PDO statement fails to throw exception). (Matteo) diff --cc ext/mbstring/php_mbregex.c index fc0b1d4,7e9756f..ec1ed1a --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@@ -451,11 -453,11 +451,11 @@@ static php_mb_regex_t *php_mbregex_comp OnigErrorInfo err_info; OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN]; - found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc); - if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) { + rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen); + if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) { if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) { - onig_error_code_to_str(err_str, err_code, err_info); + onig_error_code_to_str(err_str, err_code, &err_info); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str); + php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str); retval = NULL; goto out; }

« previous php.cvs (#93484) next »