[evolution-patches] camel leak/logic fix



Camel was using g_utf8_strdown improperly.  This fixes the leak that
results from that but it will also change the logic (since it will
actually do something now) so make sure it is still reasonable.

--Larry
? camel-mime-filter-enriched.c.new
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1825
diff -u -p -r1.1825 ChangeLog
--- ChangeLog	11 Jun 2003 15:59:29 -0000	1.1825
+++ ChangeLog	11 Jun 2003 18:09:07 -0000
@@ -1,3 +1,7 @@
+2003-06-11  Larry Ewing  <lewing ximian com>
+
+	* camel-text-index.c (text_index_normalise): use g_utf8_strdown properly.
+
 2003-06-09  Jeffrey Stedfast  <fejj ximian com>
 
 	* camel-mime-message.c (find_best_encoding): Add the
Index: camel-tcp-stream-ssl.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-tcp-stream-ssl.c,v
retrieving revision 1.59
diff -u -p -r1.59 camel-tcp-stream-ssl.c
--- camel-tcp-stream-ssl.c	21 Mar 2003 18:54:52 -0000	1.59
+++ camel-tcp-stream-ssl.c	11 Jun 2003 18:09:08 -0000
@@ -1031,7 +1031,8 @@ stream_connect (CamelTcpStream *stream, 
 	PRFileDesc *fd;
 	
 	g_return_val_if_fail (host != NULL, -1);
-	
+	g_return_val_if_fail (host->h_addr != NULL, -1);
+
 	memset ((void *) &netaddr, 0, sizeof (PRNetAddr));
 #ifdef ENABLE_IPv6
 	if (host->h_addrtype == AF_INET6)
Index: camel-text-index.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-text-index.c,v
retrieving revision 1.15
diff -u -p -r1.15 camel-text-index.c
--- camel-text-index.c	16 May 2003 18:47:49 -0000	1.15
+++ camel-text-index.c	11 Jun 2003 18:09:08 -0000
@@ -829,8 +829,8 @@ text_index_normalise(CamelIndex *idx, co
 	char *word;
 
 	/* Sigh, this is really expensive */
-	word = g_strdup(in); /*g_utf8_normalize(in, strlen(in), G_NORMALIZE_ALL);*/
-	g_utf8_strdown(word, -1);
+	/*g_utf8_normalize(in, strlen(in), G_NORMALIZE_ALL);*/
+	word = g_utf8_strdown(in, -1);
 
 	return word;
 }


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