BASE64: forcefully terminate it after deciphering it.
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 3 Feb 2014 16:12:38 +0000 (17:12 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 3 Feb 2014 16:12:38 +0000 (17:12 +0100)
libcitadel/lib/stringbuf.c

index 5e89ea2..4368646 100644 (file)
@@ -2823,6 +2823,8 @@ int StrBufDecodeBase64(StrBuf *Buf)
        free(Buf->buf);
        Buf->buf = xferbuf;
        Buf->BufUsed = siz;
        free(Buf->buf);
        Buf->buf = xferbuf;
        Buf->BufUsed = siz;
+
+       Buf->buf[Buf->BufUsed] = '\0';
        return siz;
 }
 
        return siz;
 }