evolution-data-server r8623 - trunk/camel



Author: mbarnes
Date: Mon Apr  7 05:07:47 2008
New Revision: 8623
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8623&view=rev

Log:
2008-04-07  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #526138

	* camel-mime-utils.c (camel_header_unfold):
	Return NULL if the input string is NULL.



Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-mime-utils.c

Modified: trunk/camel/camel-mime-utils.c
==============================================================================
--- trunk/camel/camel-mime-utils.c	(original)
+++ trunk/camel/camel-mime-utils.c	Mon Apr  7 05:07:47 2008
@@ -4570,9 +4570,13 @@
 char *
 camel_header_unfold(const char *in)
 {
-	char *out = g_malloc(strlen(in)+1);
 	const char *inptr = in;
-	char c, *o = out;
+	char c, *o, *out;
+
+	if (in == NULL)
+		return NULL;
+
+	out = g_malloc(strlen(in)+1);
 
 	o = out;
 	while ((c = *inptr++)) {



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