com php-src: Merge branch 'PHP-7.3' into PHP-7.4: ext/mbstring/mbstring.c ext/mbstring/mbstring.h ext/mbstring/php_mbregex.c php. ini-development
php.ini-production
| From: | Stanislav Malyshev | Date: | Mon, 01 Apr 2019 07:05:36 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.3' into PHP-7.4: ext/mbstring/mbstring.c ext/mbstring/mbstring.h ext/mbstring/php_mbregex.c php. ini-development php.ini-production |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105446@lists.php.net to get a copy of this message | ||
Commit: 077ce33aa98d3c428c968091002cdbd559a8fc58
Author: Stanislav Malyshev <stas@php.net> Mon, 1 Apr 2019 00:05:36 -0700
Parents: 9dcf95ab76fb01ea905369efec0ea2ac54ffade7 3d5b6f234e3172b193856aec23fd3f6cf14e464b
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=077ce33aa98d3c428c968091002cdbd559a8fc58
Log:
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Update NEWS & UPGRADING
Add fallbacks for older oniguruma versions
Add mbstring.regex_stack_limit to php.ini-*
Implement RF bug #72777 - ensure stack limits on mbstring functions.
Bugs:
https://bugs.php.net/72777
Changed paths:
MM ext/mbstring/mbstring.c
MM ext/mbstring/mbstring.h
MM ext/mbstring/php_mbregex.c
MM php.ini-development
MM php.ini-production
Diff:
diff --cc ext/mbstring/mbstring.c
index cf0b08b,28ea4bd..d8248aa
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@@ -56,15 -56,29 +56,26 @@@
#include "mb_gpc.h"
#if HAVE_MBREGEX
-#include "php_mbregex.h"
-#endif
-
-#include "zend_multibyte.h"
-
-#if HAVE_ONIG
-#include "php_onig_compat.h"
-#include <oniguruma.h>
-#undef UChar
+# include "php_mbregex.h"
+# include "php_onig_compat.h"
+# include <oniguruma.h>
+# undef UChar
+ #if ONIGURUMA_VERSION_INT < 60800
+ typedef void OnigMatchParam;
+ #define onig_new_match_param() (NULL)
+ #define onig_initialize_match_param(x)
+ #define onig_set_match_stack_limit_size_of_match_param(x, y)
+ #define onig_free_match_param(x)
+ #define onig_search_with_param(reg, str, end, start, range, region, option, mp) \
- onig_search(reg, str, end, start, range, region, option)
++onig_search(reg, str, end, start, range, region, option)
+ #define onig_match_with_param(re, str, end, at, region, option, mp) \
- onig_match(re, str, end, at, region, option)
++onig_match(re, str, end, at, region, option)
+ #endif
-#elif HAVE_PCRE || HAVE_BUNDLED_PCRE
-#include "ext/pcre/php_pcre.h"
+#else
+# include "ext/pcre/php_pcre.h"
#endif
+
+#include "zend_multibyte.h"
/* }}} */
#if HAVE_MBSTRING
diff --cc ext/mbstring/mbstring.h
index 7321525,29fe1e9..cd882c1
--- a/ext/mbstring/mbstring.h
+++ b/ext/mbstring/mbstring.h
@@@ -165,8 -166,9 +165,9 @@@ ZEND_BEGIN_MODULE_GLOBALS(mbstring
void *http_output_conv_mimetypes;
#if HAVE_MBREGEX
struct _zend_mb_regex_globals *mb_regex_globals;
+ zend_long regex_stack_limit;
#endif
- char *last_used_encoding_name;
+ zend_string *last_used_encoding_name;
const mbfl_encoding *last_used_encoding;
ZEND_END_MODULE_GLOBALS(mbstring)