From 0543f1a9b66d0fd8e53a1707e8736d7920a521f0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 4 Jul 2011 03:52:36 +0000 Subject: backport eet_node fixes SVN revision: 60959 --- AUTHORS | 1 + ChangeLog | 3 +++ src/lib/eet_node.c | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/AUTHORS b/AUTHORS index 6ec31c0..afdb972 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,3 +10,4 @@ Raphael Kubo da Costa Mathieu Taillefumier Albin "Lutin" Tonnerre Adam Simpkins +Mike Blumenkrantz diff --git a/ChangeLog b/ChangeLog index dd3ba42..405d123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -495,3 +495,6 @@ * 1.4.1 release +2011-07-04 Mike Blumenkrantz + + * Fix segmentation faults in several eet_node functions diff --git a/src/lib/eet_node.c b/src/lib/eet_node.c index 35d820a..432b2ef 100644 --- a/src/lib/eet_node.c +++ b/src/lib/eet_node.c @@ -213,6 +213,8 @@ eet_node_struct_child_new(const char *parent, { Eet_Node *n; + if (!child) return NULL; + if (child->type != EET_G_UNKNOWN) return child; @@ -233,6 +235,7 @@ eet_node_list_append(Eet_Node *parent, const char *tmp; Eet_Node *nn; + if ((!parent) || (!child)) return; tmp = eina_stringshare_add(name); for (nn = parent->values; nn; nn = nn->next) @@ -275,6 +278,7 @@ eet_node_struct_append(Eet_Node *parent, Eet_Node *prev; Eet_Node *nn; + if ((!parent) || (!child)) return; if (parent->type != EET_G_UNKNOWN) { ERR("[%s] is not a structure. Will not insert [%s] in it", @@ -322,6 +326,8 @@ eet_node_hash_add(Eet_Node *parent, { Eet_Node *nn; + if ((!parent) || (!child)) return; + /* No list found, so create it. */ nn = eet_node_hash_new(name, key, child); -- cgit v1.2.1