projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b82d929
)
Force initialization of buffer (fixes a valgrind case where buf is
author
wwp
<wwp@free.fr>
Tue, 8 May 2018 06:54:16 +0000
(08:54 +0200)
committer
wwp
<wwp@free.fr>
Tue, 8 May 2018 06:54:16 +0000
(08:54 +0200)
used uninitialized).
src/procmime.c
patch
|
blob
|
history
diff --git
a/src/procmime.c
b/src/procmime.c
index 44e546c3a930f3e2fef8b5552fdd933041a5030d..2be4b12c792b531e1fc40409c4987c2c00e28095 100644
(file)
--- a/
src/procmime.c
+++ b/
src/procmime.c
@@
-380,11
+380,12
@@
gboolean procmime_decode_content(MimeInfo *mimeinfo)
tmp_file = TRUE;
readend = mimeinfo->offset + mimeinfo->length;
+ *buf = '\0';
if (encoding == ENC_QUOTED_PRINTABLE) {
while ((ftell(infp) < readend) && (SC_FGETS(buf, sizeof(buf), infp) != NULL)) {
gint len;
len = qp_decode_line(buf);
- buf[len]
=
'\0';
+ buf[len]
=
'\0';
if (!flowed) {
if (SC_FWRITE(buf, 1, len, outfp) < len)
err = TRUE;