[evolution-patches] 70195, bug with rfc2047 encoding





Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2435
diff -u -p -r1.2435 ChangeLog
--- camel/ChangeLog	2 Mar 2005 02:56:20 -0000	1.2435
+++ camel/ChangeLog	2 Mar 2005 04:12:57 -0000
@@ -1,3 +1,14 @@
+2005-03-02  Not Zed  <NotZed Ximian com>
+
+	** See bug #70195
+
+	* camel-mime-utils.c (rfc2047_encode_word): if we fail to convert
+	all the buffer, skip the content we didn't convert - don't just
+	skip the number of bytes we didn't convert from the start of the
+	string.
+	(header_encode_phrase_merge_words): when we merge the word, make
+	sure we merge the encoding too.
+
 2005-03-01  Not Zed  <NotZed Ximian com>
 
 	** See bug #72876
Index: camel/camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-utils.c,v
retrieving revision 1.224
diff -u -p -r1.224 camel-mime-utils.c
--- camel/camel-mime-utils.c	1 Mar 2005 02:37:22 -0000	1.224
+++ camel/camel-mime-utils.c	2 Mar 2005 04:12:58 -0000
@@ -1233,7 +1233,7 @@ rfc2047_encode_word(GString *outstring, 
 			if (e_iconv (ic, &inptr, &convlen, &out, &outlen) == (size_t) -1 && errno != EINVAL) {
 				w(g_warning("Conversion problem: conversion truncated: %s", strerror (errno)));
 				/* blah, we include it anyway, better than infinite loop ... */
-				inptr = p + convlen;
+				inptr += convlen;
 			} else {
 				/* make sure we flush out any shift state */
 				e_iconv (ic, NULL, 0, &out, &outlen);
@@ -1536,7 +1536,7 @@ header_encode_phrase_merge_words (GList 
 				if (MERGED_WORD_LT_FOLDLEN (next->end - word->start, MAX (word->type, next->type))) {
 					/* the resulting word type is the MAX of the 2 types */
 					word->type = MAX(word->type, next->type);
-					
+					word->encoding = MAX(word->encoding, next->encoding);
 					word->end = next->end;
 					words = g_list_remove_link (words, nextl);
 					g_list_free_1 (nextl);


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