[Commits] [SCM] claws branch, master, updated. 3.18.0-202-g286e63ec8

wwp at claws-mail.org wwp at claws-mail.org
Wed Sep 29 12:45:04 CEST 2021


The branch, master has been updated
       via  286e63ec8361b7f195925ab1854c2227416d3a56 (commit)
      from  00d8211caa63bdb27e881c063f7684e88594e47e (commit)

Summary of changes:
 src/plugins/managesieve/sieve_editor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 286e63ec8361b7f195925ab1854c2227416d3a56
Author: wwp <subscript at free.fr>
Date:   Wed Sep 29 12:43:22 2021 +0200

    Fix CID 1491362: dereference after null check.
    Fix CID 1491278: (neutral) use after free (but still better to disable callbacks before freeing).

diff --git a/src/plugins/managesieve/sieve_editor.c b/src/plugins/managesieve/sieve_editor.c
index 3ed102201..3c99e0c39 100644
--- a/src/plugins/managesieve/sieve_editor.c
+++ b/src/plugins/managesieve/sieve_editor.c
@@ -164,7 +164,7 @@ static void sieve_editor_append_status(SieveEditorPage *page,
 	GtkLabel *label = GTK_LABEL(page->status_text);
 	const gchar *prev_status = gtk_label_get_text(label);
 	const gchar *sep = prev_status && prev_status[0] ? "\n" : "";
-	gchar *status = g_strconcat(prev_status, sep, new_status, NULL);
+	gchar *status = g_strconcat(prev_status ? prev_status : "", sep, new_status, NULL);
 	gtk_label_set_text(label, status);
 	g_free(status);
 }
@@ -422,8 +422,8 @@ static void sieve_editor_destroy(SieveEditorPage *page)
 void sieve_editor_close(SieveEditorPage *page)
 {
 	editors = g_slist_remove(editors, (gconstpointer)page);
-	sieve_editor_destroy(page);
 	sieve_sessions_discard_callbacks(page);
+	sieve_editor_destroy(page);
 }
 
 static gboolean sieve_editor_confirm_close(SieveEditorPage *page)

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list