diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 1c7124e7fe..174832e7c2 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -713,6 +713,7 @@ char *php_pcre_replace(char *regex, int regex_len, } else { *walkbuf++ = *walk++; } + *walkbuf = '\0'; /* increment the result length by how much we've added to the string */ *result_len += walkbuf - (result + *result_len); } |