From fc6cb49257a19bff1336d735a075f78fae2f4728 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 3 Feb 2014 17:12:38 +0100 Subject: [PATCH] BASE64: forcefully terminate it after deciphering it. --- libcitadel/lib/stringbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 5e89ea2f1..436864690 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2823,6 +2823,8 @@ int StrBufDecodeBase64(StrBuf *Buf) free(Buf->buf); Buf->buf = xferbuf; Buf->BufUsed = siz; + + Buf->buf[Buf->BufUsed] = '\0'; return siz; } -- 2.30.2