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 5e89ea2f19b48f8c38edd1b5835f3754109f3379..436864690bd62d0af5eb9f638053de41ac9fe495 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;
 }