From: Wilfried Goesgens Date: Fri, 24 Jul 2015 10:31:56 +0000 (+0200) Subject: Fix swap of parameters when decoding base64; this could have lead to eventually to... X-Git-Tag: Release_902~156^2~1^2~16 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f40d1c4cc9f50e8226d9ebc54012d8f2c586e5b2 Fix swap of parameters when decoding base64; this could have lead to eventually to small target buffers. --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 134ff4779..0340ce4d4 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2827,7 +2827,7 @@ int StrBufDecodeBase64To(const StrBuf *BufIn, StrBuf *BufOut) return -1; if (BufOut->BufSize < BufIn->BufUsed) - IncreaseBuf(BufOut, BufIn->BufUsed, 0); + IncreaseBuf(BufOut, 0, BufIn->BufUsed); BufOut->BufUsed = CtdlDecodeBase64(BufOut->buf, BufIn->buf,