From: foobar Date: Fri, 12 Sep 2003 01:32:38 +0000 (+0000) Subject: MFH: - Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters) X-Git-Tag: php-4.3.4RC1~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dadbe38550f10cf130ee19e281e4623253ae023;p=php MFH: - Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters) --- diff --git a/NEWS b/NEWS index 53e474a505..cba30eeb98 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP 4 NEWS - Fixed crash bug when non-existing save/serializer handler was used. (Jani) - Fixed memory leak in gethostbynamel() if an error occurs. (Sara) - Fixed FastCGI being unable to bind to a specific IP. (Sascha) +- Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters). + (Jani) - Fixed bug #25494 (array_merge*() allows non-arrays as argument). (Jay) - Fixed bug #23488 (zlib.output_compression overrides Vary header). (Stefan) - Fixed bug #25483 (ext/informix: bogus -469 error from ifx_query()). diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index e20712b384..7ea9714ff2 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -372,7 +372,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) char **subpat_names = NULL;/* Array for named subpatterns */ int i; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|zll", ®ex, ®ex_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ((global) ? "ssz|ll" : "ss|zll"), ®ex, ®ex_len, &subject, &subject_len, &subpats, &flags, &start_offset) == FAILURE) { RETURN_FALSE; }