From 245d28e447e8d38291f439436f2c86990402a6b0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 14 Oct 2001 12:40:26 +0000 Subject: return of vsnprintf doesn't include termination thanks to simo for spotting this (This used to be commit acd84ed762a5f50c69c79d13cb18e4204096b304) --- source3/lib/talloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 7bfabdd88d..1e9c0759db 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -178,7 +178,7 @@ char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...) len = vsnprintf(NULL, 0, fmt, ap); va_end(ap); - ret = talloc(t, len); + ret = talloc(t, len+1); if (!ret) return NULL; va_start(ap, fmt); -- cgit