[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-42-g4ccef54a7

mones at claws-mail.org mones at claws-mail.org
Sat Feb 10 18:31:56 UTC 2024


The branch, gtk2 has been updated
       via  4ccef54a7a91069592697d50f00233b471cf0b59 (commit)
      from  2071a7c31318f2b53c800809589949cb4eb046af (commit)

Summary of changes:
 src/msgcache.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 4ccef54a7a91069592697d50f00233b471cf0b59
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Feb 10 19:30:08 2024 +0100

    Fix CIDs 1220325, 1491306 and 1491315
    
    Three instances of "Explicit null dereferenced (FORWARD_NULL)"

diff --git a/src/msgcache.c b/src/msgcache.c
index 664b67e80..03f85d02a 100644
--- a/src/msgcache.c
+++ b/src/msgcache.c
@@ -1105,15 +1105,18 @@ static void msgcache_write_func(gpointer key, gpointer value, gpointer user_data
 gint msgcache_write(const gchar *cache_file, const gchar *mark_file, const gchar *tags_file, MsgCache *cache)
 {
 	struct write_fps write_fps;
-	gchar *new_cache, *new_mark, *new_tags;
+	gchar *new_cache = NULL, *new_mark = NULL, *new_tags = NULL;
 	int w_err = 0, wrote = 0;
 
 	START_TIMING("");
 	cm_return_val_if_fail(cache != NULL, -1);
 
-	new_cache = g_strconcat(cache_file, ".new", NULL);
-	new_mark  = g_strconcat(mark_file, ".new", NULL);
-	new_tags  = g_strconcat(tags_file, ".new", NULL);
+	if (cache_file)
+		new_cache = g_strconcat(cache_file, ".new", NULL);
+	if (mark_file)
+		new_mark  = g_strconcat(mark_file, ".new", NULL);
+	if (tags_file)
+		new_tags  = g_strconcat(tags_file, ".new", NULL);
 
 	write_fps.error = 0;
 	write_fps.cache_size = 0;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list