From: Andrei Zmievski Date: Sat, 10 Jun 2000 19:43:20 +0000 (+0000) Subject: Terminate the string with '\0'. X-Git-Tag: php-4.0.1RC~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43793b94f79a66999a4aea95b1beec8bb0c499d3;p=php Terminate the string with '\0'. --- 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); }