+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
( 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
gboolean uncanonicalize = FALSE;
FILE *tmpfp = outfp;
gboolean null_bytes = FALSE;
+ gboolean starting = TRUE;
if (mimeinfo->type == MIMETYPE_TEXT ||
mimeinfo->type == MIMETYPE_MESSAGE) {
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"),