From b7e23d00c66dfb198c06fb027170435fe6ff6543 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 14 Aug 2005 21:04:52 +0000 Subject: [PATCH] - Need to terminate [v]uspprintf() with two \0 --- main/spprintf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/spprintf.c b/main/spprintf.c index 12b4fb843e..1b0166d8e3 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -847,6 +847,7 @@ PHPAPI int vuspprintf(char **pbuf, size_t max_len, const char *format, va_list a if (max_len && xbuf.len > max_len) { xbuf.len = max_len; } + smart_str_appendc(&xbuf, '\0'); /* we need \0\0 as termination */ smart_str_0(&xbuf); *pbuf = xbuf.c; -- 2.40.0