[Commits] [SCM] claws branch, master, updated. 4.2.0-43-g6e0856ba5

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


The branch, master has been updated
       via  6e0856ba50f76742c443fe2e47d802261502306b (commit)
      from  0171c23bde9ab928be51b16e84137255173eb72c (commit)

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


- Log -----------------------------------------------------------------
commit 6e0856ba50f76742c443fe2e47d802261502306b
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 1d87290ca..d4e422d6f 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