summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2000-06-10 19:43:20 +0000
committerAndrei Zmievski <andrei@php.net>2000-06-10 19:43:20 +0000
commit43793b94f79a66999a4aea95b1beec8bb0c499d3 (patch)
tree6df451d9c993bc8adf7580cc5ed2cbe62daa951e
parent2ef880c0482b591b7ca48e2f567eb9e7cc04a172 (diff)
downloadphp-git-43793b94f79a66999a4aea95b1beec8bb0c499d3.tar.gz
Terminate the string with '\0'.
-rw-r--r--ext/pcre/php_pcre.c1
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);
}