[Commits] [SCM] claws branch, master, updated. 3.16.0-160-gc5288aa

wwp at claws-mail.org wwp at claws-mail.org
Tue May 8 08:55:00 CEST 2018


The branch, master has been updated
       via  c5288aacee452100bfd138f92b5244b66425da13 (commit)
      from  b82d929f48cf3e0f8ff248c40c871075e9f54152 (commit)

Summary of changes:
 src/procmime.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit c5288aacee452100bfd138f92b5244b66425da13
Author: wwp <wwp at free.fr>
Date:   Tue May 8 08:54:16 2018 +0200

    Force initialization of buffer (fixes a valgrind case where buf is
    used uninitialized).

diff --git a/src/procmime.c b/src/procmime.c
index 44e546c..2be4b12 100644
--- 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;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list