From d61821dda2ab26c13ddeb3f86ebceb1f82cc28bd Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 8 Oct 2004 02:51:00 +0000 Subject: handle wrong root element properly. From David Trowbridge 2004-10-08 Not Zed * e-plugin.c (ep_load): handle wrong root element properly. From David Trowbridge svn path=/trunk/; revision=27503 --- e-util/ChangeLog | 5 +++++ e-util/e-plugin.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 445377bf49..d27b83f09e 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2004-10-08 Not Zed + + * e-plugin.c (ep_load): handle wrong root element properly. From + David Trowbridge + 2004-10-07 Not Zed * e-plugin.h: Fix the function pointer types! diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index 08fc304699..0524fcc81f 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -219,8 +219,11 @@ ep_load(const char *filename) } root = xmlDocGetRootElement(doc); - if (strcmp(root->name, "e-plugin-list") != 0) - goto fail; + if (strcmp(root->name, "e-plugin-list") != 0) { + g_warning("No root element: %s", filename); + xmlFreedoc(doc); + return -1; + } pdoc = g_malloc0(sizeof(*pdoc)); pdoc->doc = doc; -- cgit v1.2.3