[Commits] [SCM] claws branch, master, updated. 3.14.1-140-g033bbdd

wwp at claws-mail.org wwp at claws-mail.org
Mon Jan 16 18:30:53 CET 2017


The branch, master has been updated
       via  033bbdd7cd3e81e56054a514ef50ca473e89bbf0 (commit)
      from  989b3a3f51c691b0bb0fd48521063a8c76d269ce (commit)

Summary of changes:
 src/compose.c     |    6 ++++--
 src/messageview.c |    2 +-
 src/procheader.c  |    8 +-------
 3 files changed, 6 insertions(+), 10 deletions(-)


- Log -----------------------------------------------------------------
commit 033bbdd7cd3e81e56054a514ef50ca473e89bbf0
Author: wwp <wwp at free.fr>
Date:   Mon Jan 16 18:29:15 2017 +0100

    Fix Coverity CIDs #1398812, #1398813, #1398814.
    Will convert compose_convert_header needs for fixed buffers later.

diff --git a/src/compose.c b/src/compose.c
index 3308f3c..dfd0d22 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5564,13 +5564,15 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
 				err |= (fputs(" (by way of ", fdest) == EOF);
 				if (compose->account->name
 				    && *compose->account->name) {
+					gchar buffer[BUFFSIZE];
+
 					compose_convert_header
-						(compose, buf, sizeof(buf),
+						(compose, buffer, sizeof(buffer),
 						 compose->account->name,
 						 strlen("From: "),
 						 FALSE);
 					err |= (fprintf(fdest, "%s <%s>",
-						buf,
+						buffer,
 						compose->account->address) < 0);
 				} else
 					err |= (fprintf(fdest, "%s",
diff --git a/src/messageview.c b/src/messageview.c
index 7052ff8..4e15e07 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -794,7 +794,7 @@ static void notification_convert_header(gchar **dest,
 	} else {
 		*dest = g_malloc(BUFFSIZE);
 		if (*dest)
-			conv_encode_header(*dest, sizeof(dest), src, header_len, FALSE);
+			conv_encode_header(*dest, BUFFSIZE, src, header_len, FALSE);
 		else
 			debug_print("notification_convert_header: alloc");
 	}
diff --git a/src/procheader.c b/src/procheader.c
index 2aa4e6f..f09cf9c 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -1155,13 +1155,7 @@ gint procheader_get_header_from_msginfo(MsgInfo *msginfo, gchar **buf, gchar *he
 		return -1;
 	}
 	val = procheader_get_one_field(buf, fp, hentry);
-	if (buf == NULL) {
-		claws_unlink(file);
-		g_free(file);
-		g_free(*buf);
-		*buf = NULL;
-		return -1;
-	}
+
 	if (fclose(fp) == EOF) {
 		FILE_OP_ERROR(file, "fclose");
 		claws_unlink(file);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list