evolution-data-server r8404 - trunk/camel/providers/groupwise



Author: mcrha
Date: Tue Jan 22 19:27:39 2008
New Revision: 8404
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8404&view=rev

Log:
2008-01-22  Milan Crha  <mcrha redhat com>

	** Fix for bug #498977

	* camel-groupwise-utils.c: (send_as_attachment):
	Prevent encoding to base64 of no data in the content buffer.



Modified:
   trunk/camel/providers/groupwise/ChangeLog
   trunk/camel/providers/groupwise/camel-groupwise-utils.c

Modified: trunk/camel/providers/groupwise/camel-groupwise-utils.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-utils.c	(original)
+++ trunk/camel/providers/groupwise/camel-groupwise-utils.c	Tue Jan 22 19:27:39 2008
@@ -300,7 +300,7 @@
 	if (cid)
 		attachment->contentid = camel_header_contentid_decode (cid);
 
-	if (filename) {
+	if (filename && content->buffer->data) {
 		if (camel_content_type_is (type, "application", "pgp-signature")) {
 			char *temp_str;
 			int temp_len;
@@ -315,7 +315,7 @@
 			attachment->data = g_base64_encode(content->buffer->data, content->buffer->len);
 			attachment->size = strlen (attachment->data);
 		}
-	} else {
+	} else if (content->buffer->data) {
 		char *temp_str;
 		int temp_len;
 		if (!strcmp (attachment->contentType, "multipart/digest")) {



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