[evolution-patches] fix for crash loading improperly formatted .eplug files
- From: David Trowbridge <David Trowbridge Colorado edu>
 
- To: evolution-patches lists ximian com
 
- Subject: [evolution-patches] fix for crash loading improperly formatted .eplug files
 
- Date: Thu, 07 Oct 2004 16:19:14 -0600
 
If the top-level element is wrong, some floating pointers are freed.
Simple fix is attached.
-David
Index: e-util/e-plugin.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-plugin.c,v
retrieving revision 1.3
diff -u -r1.3 e-plugin.c
--- e-util/e-plugin.c	7 Oct 2004 08:20:31 -0000	1.3
+++ e-util/e-plugin.c	7 Oct 2004 22:16:43 -0000
@@ -219,8 +219,10 @@
 	}
 
 	root = xmlDocGetRootElement(doc);
-	if (strcmp(root->name, "e-plugin-list") != 0)
-		goto fail;
+	if (strcmp(root->name, "e-plugin-list") != 0) {
+		xmlFreeDoc (doc);
+		return -1;
+	}
 
 	pdoc = g_malloc0(sizeof(*pdoc));
 	pdoc->doc = doc;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]