]> granicus.if.org Git - php/commitdiff
Fix calculation as sync with 48cee6d1
authorAnatol Belski <ab@php.net>
Mon, 13 Nov 2017 22:01:43 +0000 (23:01 +0100)
committerAnatol Belski <ab@php.net>
Mon, 13 Nov 2017 23:01:52 +0000 (00:01 +0100)
ext/pcre/php_pcre.c

index 1da619a59032e97084ac3f4673b8d5c58313a611..d528105f775dc9200133730cf09dbd1fa8ed1a62 100644 (file)
@@ -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;
        }