]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters)
authorfoobar <sniper@php.net>
Fri, 12 Sep 2003 01:32:38 +0000 (01:32 +0000)
committerfoobar <sniper@php.net>
Fri, 12 Sep 2003 01:32:38 +0000 (01:32 +0000)
NEWS
ext/pcre/php_pcre.c

diff --git a/NEWS b/NEWS
index 53e474a5051a38e9e4d5e9079ce304350fb904dc..cba30eeb9813202e2bcb3e349a79fba7e65c745b 100644 (file)
--- 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()). 
index e20712b38460bb2d5bc3f97d7d9c7856ff8a4aa9..7ea9714ff2dda4b317cd31ebab6abf80f549daa7 100644 (file)
@@ -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", &regex, &regex_len,
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ((global) ? "ssz|ll" : "ss|zll"), &regex, &regex_len,
                                                          &subject, &subject_len, &subpats, &flags, &start_offset) == FAILURE) {
                RETURN_FALSE;
        }