talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 02b5e1ced57de18def0b13011932748935dfed8a
parent 21f4e34752b60739c7519a84462fefcd364ee265
Author: Colin Leroy <colin@colino.net>
Date:   Tue, 15 Sep 2009 19:13:30 +0000

2009-09-15 [colin]	3.7.2cvs33

	* src/procmime.c
		Complete 3.7.1cvs42: only output directly to
		final file if we get NULL byes at the start.
		Still fixes saving UTF16 files, but also
		fixes displaying Base64 parts with decoding
		errors (parts without errors get displayed)

Diffstat:
MChangeLog | 9+++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/procmime.c | 4+++-
4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,12 @@ +2009-09-15 [colin] 3.7.2cvs33 + + * src/procmime.c + Complete 3.7.1cvs42: only output directly to + final file if we get NULL byes at the start. + Still fixes saving UTF16 files, but also + fixes displaying Base64 parts with decoding + errors (parts without errors get displayed) + 2009-09-14 [colin] 3.7.2cvs32 * src/matcher.c diff --git a/PATCHSETS b/PATCHSETS @@ -3857,3 +3857,4 @@ ( cvs diff -u -r 1.1.2.25 -r 1.1.2.26 manual/plugins.xml; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 manual/es/plugins.xml; ) > 3.7.2cvs30.patchset ( cvs diff -u -r 1.36.2.174 -r 1.36.2.175 src/common/utils.c; ) > 3.7.2cvs31.patchset ( cvs diff -u -r 1.75.2.65 -r 1.75.2.66 src/matcher.c; cvs diff -u -r 1.39.2.17 -r 1.39.2.18 src/matcher.h; cvs diff -u -r 1.25.2.33 -r 1.25.2.34 src/matcher_parser_parse.y; cvs diff -u -r 1.43.2.81 -r 1.43.2.82 src/prefs_matcher.c; ) > 3.7.2cvs32.patchset +( cvs diff -u -r 1.49.2.130 -r 1.49.2.131 src/procmime.c; ) > 3.7.2cvs33.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=2 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=32 +EXTRA_VERSION=33 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/procmime.c b/src/procmime.c @@ -351,6 +351,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo) gboolean uncanonicalize = FALSE; FILE *tmpfp = outfp; gboolean null_bytes = FALSE; + gboolean starting = TRUE; if (mimeinfo->type == MIMETYPE_TEXT || mimeinfo->type == MIMETYPE_MESSAGE) { @@ -367,10 +368,11 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo) decoder = base64_decoder_new(); while ((ftell(infp) < readend) && (fgets(buf, sizeof(buf), infp) != NULL)) { len = base64_decoder_decode(decoder, buf, outbuf); - if (uncanonicalize == TRUE && strlen(outbuf) < len) { + if (uncanonicalize == TRUE && strlen(outbuf) < len && starting) { uncanonicalize = FALSE; null_bytes = TRUE; } + starting = FALSE; if (len < 0 && !got_error) { g_warning("Bad BASE64 content.\n"); if (fwrite(_("[Error decoding BASE64]\n"),