[evolution-patches] Patch for CamelURL



Here's a patch to make sure base->path is never NULL. Currently it can
be NULL sometimes, and causes a crash when it hits the strrchr() call
in the same function.

-- dobey

? camel/camel-mime-tables.c
Index: camel/camel-url.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-url.c,v
retrieving revision 1.42
diff -u -p -r1.42 camel-url.c
--- camel/camel-url.c	12 Jan 2005 08:46:49 -0000	1.42
+++ camel/camel-url.c	22 Jan 2005 20:44:05 -0000
@@ -200,6 +200,9 @@ camel_url_new_with_base (CamelURL *base,
 		url->host = g_strdup (base->host);
 		url->port = base->port;
 
+		if (!base->path)
+			base->path = g_strdup ("/");
+
 		if (!url->path) {
 			url->path = g_strdup (base->path);
 			if (!url->params) {


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