[Commits] [SCM] claws branch, master, updated. 3.11.1-23-gd4005f1

Colin colin at claws-mail.org
Mon Nov 17 09:25:22 CET 2014


The branch, master has been updated
       via  d4005f12d64767d6df98b6c6752f61d723cc6777 (commit)
      from  a1d8f05f4e1a40f16a6fa2ed23ab5a0e75987230 (commit)

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


- Log -----------------------------------------------------------------
commit d4005f12d64767d6df98b6c6752f61d723cc6777
Author: Colin Leroy <colin at colino.net>
Date:   Mon Nov 17 09:24:58 2014 +0100

    Fix use after free

diff --git a/src/msgcache.c b/src/msgcache.c
index cb2afcc..82480ed 100644
--- a/src/msgcache.c
+++ b/src/msgcache.c
@@ -187,10 +187,12 @@ void msgcache_remove_msg(MsgCache *cache, guint msgnum)
 	if(msginfo->msgid)
 		g_hash_table_remove(cache->msgid_table, msginfo->msgid);
 	g_hash_table_remove(cache->msgnum_table, &msginfo->msgnum);
+
+	msginfo->folder->cache_dirty = TRUE;
+
 	procmsg_msginfo_free(msginfo);
 	cache->last_access = time(NULL);
 
-	msginfo->folder->cache_dirty = TRUE;
 
 	debug_print("Cache size: %d messages, %u bytes\n", g_hash_table_size(cache->msgnum_table), cache->memusage);
 }

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list