From: Wilfried Göesgens Date: Sun, 25 Jul 2010 15:40:12 +0000 (+0000) Subject: * StrBufDecodeBase64(): init output buffer so in case of an empty / illegal base64... X-Git-Tag: v7.86~78 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=32db095182bd51cdb079076ce76e81efc3e6f477 * StrBufDecodeBase64(): init output buffer so in case of an empty / illegal base64 string its defined. --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 250b3109c..fa51fcce7 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2259,6 +2259,7 @@ int StrBufDecodeBase64(StrBuf *Buf) if (Buf == NULL) return -1; xferbuf = (char*) malloc(Buf->BufSize); + *xferbuf = '\0'; siz = CtdlDecodeBase64(xferbuf, Buf->buf, Buf->BufUsed);