[evolution/gnome-3-22] Bug 767228 - Use-after-free in MessageList rebuild under clear_tree() ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-22] Bug 767228 - Use-after-free in MessageList rebuild under clear_tree() ][
- Date: Mon, 28 Nov 2016 17:01:43 +0000 (UTC)
commit 1b512d9a18c13dfb243bad439b60ed0d9bbdfaa5
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 28 17:58:08 2016 +0100
Bug 767228 - Use-after-free in MessageList rebuild under clear_tree() ][
Some missed changes...
e-util/e-tree-table-adapter.c | 9 ++++++---
mail/message-list.c | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-tree-table-adapter.c b/e-util/e-tree-table-adapter.c
index 4ce10b0..8430476 100644
--- a/e-util/e-tree-table-adapter.c
+++ b/e-util/e-tree-table-adapter.c
@@ -948,6 +948,7 @@ tree_table_adapter_value_at (ETableModel *etm,
gint row)
{
ETreeTableAdapter *etta = (ETreeTableAdapter *) etm;
+ ETreePath path;
switch (col) {
case -1:
@@ -959,9 +960,11 @@ tree_table_adapter_value_at (ETableModel *etm,
case -3:
return etta;
default:
- return e_tree_model_value_at (
- etta->priv->source_model,
- e_tree_table_adapter_node_at_row (etta, row), col);
+ path = e_tree_table_adapter_node_at_row (etta, row);
+ if (!path)
+ return NULL;
+
+ return e_tree_model_value_at (etta->priv->source_model, path, col);
}
}
diff --git a/mail/message-list.c b/mail/message-list.c
index be68e85..0a7c7b4 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3172,7 +3172,7 @@ message_list_value_at (ETreeModel *tree_model,
message_list = MESSAGE_LIST (tree_model);
- if (G_NODE_IS_ROOT ((GNode *) path))
+ if (!path || G_NODE_IS_ROOT ((GNode *) path))
return NULL;
/* retrieve the message information array */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]