diff options
author | Milan Crha <mcrha@redhat.com> | 2010-10-05 20:00:08 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-10-05 20:00:08 +0800 |
commit | 36abdbd529d064ace5a60b3cbfc16bcf6fb0997f (patch) | |
tree | 2f9776b6bb12cf2d5f36a5717cd4ed46b3b2f868 | |
parent | c50fe842f07af78a54e839be5fde8051de4a3d56 (diff) | |
download | gsoc2013-evolution-36abdbd529d064ace5a60b3cbfc16bcf6fb0997f.tar.gz gsoc2013-evolution-36abdbd529d064ace5a60b3cbfc16bcf6fb0997f.tar.zst gsoc2013-evolution-36abdbd529d064ace5a60b3cbfc16bcf6fb0997f.zip |
Bug #630295 - Inline GPG encrypted message is not always recognized
-rw-r--r-- | mail/em-inline-filter.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index b780256e2b..f0fdc553a0 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -150,7 +150,7 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) EMInlineFilter *emif = (EMInlineFilter *)f; gchar *inptr = in, *inend = in+len; gchar *data_start = in; - gchar *start; + gchar *start = in; while (inptr < inend) { gint rest_len; @@ -290,9 +290,13 @@ inline_filter_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) /* always stop as plain, especially when not read those tags fully */ emif->state = EMIF_PLAIN; - inline_filter_add_part(emif, data_start, inend-data_start); + inline_filter_add_part (emif, data_start, inend - data_start); + } else if (start > data_start) { + /* backup the last line, in case the tag is divided within buffers */ + camel_mime_filter_backup (f, start, inend - start); + g_byte_array_append (emif->data, (guchar *)data_start, start - data_start); } else { - g_byte_array_append(emif->data, (guchar *)data_start, inend-data_start); + g_byte_array_append (emif->data, (guchar *)data_start, inend - data_start); } return 0; |