com php-src: Initialize the offset table - PCRE may sometimes miss offsets: ext/pcre/php_pcre.c

From: Date: Mon, 03 Nov 2014 19:31:02 +0000
Subject: com php-src: Initialize the offset table - PCRE may sometimes miss offsets: ext/pcre/php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82937@lists.php.net to get a copy of this message
Commit: c351b47ce85a3a147cfa801fa9f0149ab4160834 Author: Stanislav Malyshev <stas@php.net> Sun, 2 Nov 2014 16:04:00 -0800 Parents: 1a2ec3fc60e428c47fd59c9dd7966c71ca44024d Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c351b47ce85a3a147cfa801fa9f0149ab4160834 Log: Initialize the offset table - PCRE may sometimes miss offsets Changed paths: M ext/pcre/php_pcre.c Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index bd93f72..d7a4309 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);

« previous php.cvs (#82937) next »