]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorStanislav Malyshev <stas@php.net>
Mon, 1 Apr 2019 07:05:36 +0000 (00:05 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 1 Apr 2019 07:05:36 +0000 (00:05 -0700)
* 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.

1  2 
ext/mbstring/mbstring.c
ext/mbstring/mbstring.h
ext/mbstring/php_mbregex.c
php.ini-development
php.ini-production

index cf0b08be6ed9c29f63f616ce4165da977f7846b7,28ea4bd0569610fc1976873ee621c1c69592481a..d8248aac5d7cb70382696e34ae64525efebcc8e5
  #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
index 73215250644584ed333008f319a7a9beb6bd1bad,29fe1e97e2ce22299ea464a897b6f600bd1fa17a..cd882c1c03cc7292c196210cf92b72dfafa85303
@@@ -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)
  
Simple merge
Simple merge
Simple merge