summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-10-14 12:40:26 +0000
committerAndrew Tridgell <tridge@samba.org>2001-10-14 12:40:26 +0000
commit245d28e447e8d38291f439436f2c86990402a6b0 (patch)
tree1ed2845e266be976f0a9167da3674671bbe81a02 /source3/lib
parenta689b24db14436ab1faa2f2f79b9f27b777b1fdb (diff)
downloadsamba-245d28e447e8d38291f439436f2c86990402a6b0.tar.gz
samba-245d28e447e8d38291f439436f2c86990402a6b0.tar.bz2
samba-245d28e447e8d38291f439436f2c86990402a6b0.zip
return of vsnprintf doesn't include termination
thanks to simo for spotting this (This used to be commit acd84ed762a5f50c69c79d13cb18e4204096b304)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/talloc.c2
1 files changed, 1 insertions, 1 deletions
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);