summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
committerJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
commit3e4c1717ee4f4beb9c362942a113b90fff0a7fb0 (patch)
treef5da1649f6cfb5ae06b09b9cab4fd19a4446a767 /ext/mbstring/php_mbregex.c
parentb65205028a2debc50c3e2ca1572da4c74ac87834 (diff)
parent92576c7c49a3c104bc4aea4cfa378a029bb26c86 (diff)
downloadphp-git-3e4c1717ee4f4beb9c362942a113b90fff0a7fb0.tar.gz
Merge branch 'master' into jsond
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 59238fda39..783a8c98a5 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -810,7 +810,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
OnigUChar *pos;
OnigUChar *string_lim;
char *description = NULL;
- char pat_buf[2];
+ char pat_buf[4];
const mbfl_encoding *enc;
@@ -861,6 +861,8 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
convert_to_long_ex(arg_pattern_zval);
pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval);
pat_buf[1] = '\0';
+ pat_buf[2] = '\0';
+ pat_buf[3] = '\0';
arg_pattern = pat_buf;
arg_pattern_len = 1;