From e8ac7d8dd507b3fafcb4bb25ecf35dafb5c9b2c5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 13 Nov 2017 23:01:43 +0100 Subject: [PATCH] Fix calculation as sync with 48cee6d1 --- ext/pcre/php_pcre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1