[evolution/wip/webkit2] Add a safety check to e-tree-table-adapter.c:resort_node() function



commit 572bc1e72194643c356757cdc1ee4adcaed39dec
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 24 09:07:45 2015 +0100

    Add a safety check to e-tree-table-adapter.c:resort_node() function
    
    There could happen a crash here, when a NULL was passed into
    the function, as reported downstream at:
    https://bugzilla.redhat.com/show_bug.cgi?id=1202741

 e-util/e-tree-table-adapter.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-tree-table-adapter.c b/e-util/e-tree-table-adapter.c
index a62e4f3..b81e385 100644
--- a/e-util/e-tree-table-adapter.c
+++ b/e-util/e-tree-table-adapter.c
@@ -197,6 +197,8 @@ resort_node (ETreeTableAdapter *etta,
        gint i, count;
        gboolean sort_needed;
 
+       g_return_if_fail (node != NULL);
+
        if (node->num_visible_children == 0)
                return;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]