[Commits] [SCM] claws branch, master, updated. 3.18.0-165-g8dde5e6b4
wwp at claws-mail.org
wwp at claws-mail.org
Sun Sep 26 19:43:11 CEST 2021
The branch, master has been updated
via 8dde5e6b4bd5b052ec2bf9bc12d7ca9714143cd5 (commit)
from 943c87cd311268d9c9d0766197c2ede061aa58ad (commit)
Summary of changes:
src/summaryview.c | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
- Log -----------------------------------------------------------------
commit 8dde5e6b4bd5b052ec2bf9bc12d7ca9714143cd5
Author: wwp <subscript at free.fr>
Date: Sun Sep 26 19:41:22 2021 +0200
Fix CID 1491116: explicit null dereference,
make sure folder item identifier is set and further allocations are possible when building a path list.
diff --git a/src/summaryview.c b/src/summaryview.c
index b79c4a37e..d61e82efe 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -7639,24 +7639,28 @@ static void summary_drag_data_get(GtkWidget *widget,
path_list = folder_item_get_identifier(msginfo->folder);
}
- for (cur = GTK_CMCLIST(ctree)->selection;
- cur != NULL && cur->data != NULL; cur = cur->next) {
- gchar *tmp;
+ if (path_list != NULL) {
+ for (cur = GTK_CMCLIST(ctree)->selection;
+ cur != NULL && cur->data != NULL && path_list != NULL; cur = cur->next) {
+ gchar *tmp;
- msginfo = gtk_cmctree_node_get_row_data(ctree, GTK_CMCTREE_NODE(cur->data));
- if(!msginfo)
- continue;
- tmp = path_list;
- path_list = g_strconcat(path_list, "\n", (msginfo->msgid ? msginfo->msgid : "unknown"), NULL);
- g_free(tmp);
- }
+ msginfo = gtk_cmctree_node_get_row_data(ctree, GTK_CMCTREE_NODE(cur->data));
+ if(!msginfo)
+ continue;
+ tmp = path_list;
+ path_list = g_strconcat(path_list, "\n", (msginfo->msgid ? msginfo->msgid : "unknown"), NULL);
+ g_free(tmp);
+ }
- if (path_list != NULL) {
- gtk_selection_data_set(selection_data,
+ if (path_list != NULL) {
+ gtk_selection_data_set(selection_data,
gtk_selection_data_get_target(selection_data), 8,
path_list, strlen(path_list));
- g_free(path_list);
- }
+ g_free(path_list);
+ }
+ } else {
+ g_warning("summary_drag_data_get: no folder item identifier");
+ }
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list