From 43793b94f79a66999a4aea95b1beec8bb0c499d3 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Sat, 10 Jun 2000 19:43:20 +0000 Subject: [PATCH] Terminate the string with '\0'. --- ext/pcre/php_pcre.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.50.1