diff options
author | Stanislav Malyshev <stas@php.net> | 2014-11-02 16:04:00 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-11-03 11:31:02 -0800 |
commit | c351b47ce85a3a147cfa801fa9f0149ab4160834 (patch) | |
tree | a249e24b75c0751563db48abc07bfd39ebe2e46a /ext/pcre/php_pcre.c | |
parent | 1a2ec3fc60e428c47fd59c9dd7966c71ca44024d (diff) | |
download | php-git-c351b47ce85a3a147cfa801fa9f0149ab4160834.tar.gz |
Initialize the offset table - PCRE may sometimes miss offsets
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index bd93f723d6..d7a4309b24 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -640,7 +640,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec } offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0); - + memset(offsets, 0, size_offsets*sizeof(int)); /* Allocate match sets array and initialize the values. */ if (global && subpats && subpats_order == PREG_PATTERN_ORDER) { match_sets = (zval **)safe_emalloc(num_subpats, sizeof(zval *), 0); |