From: Anatol Belski Date: Mon, 13 Nov 2017 22:01:43 +0000 (+0100) Subject: Fix calculation as sync with 48cee6d1 X-Git-Tag: php-7.3.0alpha1~1046 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8ac7d8dd507b3fafcb4bb25ecf35dafb5c9b2c5;p=php Fix calculation as sync with 48cee6d1 --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 1da619a590..d528105f77 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -842,7 +842,7 @@ PHPAPI pcre2_match_data *php_pcre_create_match_data(uint32_t capture_count, pcre rc = pcre2_pattern_info(re, PCRE2_INFO_CAPTURECOUNT, &capture_count); } - if (rc >= 0 && (capture_count + 1) * 3 <= PHP_PCRE_PREALLOC_MDATA_SIZE) { + if (rc >= 0 && capture_count + 1 <= PHP_PCRE_PREALLOC_MDATA_SIZE) { return mdata; }