]> granicus.if.org Git - php/commitdiff
Terminate the string with '\0'.
authorAndrei Zmievski <andrei@php.net>
Sat, 10 Jun 2000 19:43:20 +0000 (19:43 +0000)
committerAndrei Zmievski <andrei@php.net>
Sat, 10 Jun 2000 19:43:20 +0000 (19:43 +0000)
ext/pcre/php_pcre.c

index 1c7124e7fea532b0b8438a11607d1c2c2a980a2f..174832e7c2926014e9564d060d86342317062c9e 100644 (file)
@@ -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);
                        }