projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f08008
)
* StrBufDecodeBase64(): init output buffer so in case of an empty / illegal base64...
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 25 Jul 2010 15:40:12 +0000
(15:40 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 25 Jul 2010 15:40:12 +0000
(15:40 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 250b3109c4b57f97fdbceac74ac6cae2e576cc0a..fa51fcce79e00766ab40645ea36036f8b70fd92f 100644
(file)
--- 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);
if (Buf == NULL) return -1;
xferbuf = (char*) malloc(Buf->BufSize);
+ *xferbuf = '\0';
siz = CtdlDecodeBase64(xferbuf,
Buf->buf,
Buf->BufUsed);
siz = CtdlDecodeBase64(xferbuf,
Buf->buf,
Buf->BufUsed);