summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-09-12 01:31:54 +0000
committerfoobar <sniper@php.net>2003-09-12 01:31:54 +0000
commitdf8809650c3808c869d81a30ed306101e75d0d35 (patch)
tree6d700369b8375946f2926a619106fb2f97a7e88e /ext/pcre/php_pcre.c
parent3a9e32d7dc806c89b33c63d38928ad3a4ffcffb3 (diff)
downloadphp-git-df8809650c3808c869d81a30ed306101e75d0d35.tar.gz
- Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters)
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index b2c314ba76..e428361062 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -371,7 +371,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;
}