After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640829 - Can drop text/plain message lines in message preview
Can drop text/plain message lines in message preview
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.30.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-01-28 15:08 UTC by rostedt
Modified: 2011-03-17 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
email that had the missing line (8.55 KB, text/plain)
2011-01-28 15:08 UTC, rostedt
  Details
evo patch (831 bytes, patch)
2011-02-21 12:12 UTC, Milan Crha
committed Details | Review
eds patch (1.83 KB, patch)
2011-02-21 12:15 UTC, Milan Crha
committed Details | Review
EDS 2.32 patch (2.31 KB, patch)
2011-03-17 11:43 UTC, David Woodhouse
none Details | Review

Description rostedt 2011-01-28 15:08:02 UTC
Created attachment 179522 [details]
email that had the missing line

A patch sent to me for review was modified by Evolution causing me to get into an argument with the author, which turned out that he was correct, because I was looking at a version modified by Evolution.

Here's what the modified part of the patch looked like in Evolution:

+static void search_within_subtree(struct rb_node *n, struct inode *inode,
+               struct list_head *tmp_list)
+{
+       struct rb_node *p;
+
+       if (p)
+               __search_within_subtree(p, inode, tmp_list);
+

Where 'p' is not initialized. Doing a Ctrl^u, it shows the real content:

+static void search_within_subtree(struct rb_node *n, struct inode *inode,
+               struct list_head *tmp_list)
+{
+       struct rb_node *p;
+
+       p = n->rb_left;
+       if (p)
+               __search_within_subtree(p, inode, tmp_list);

were 'p' is initialized.

This affected myself as well as another patch reviewer. Those using mutt, were not affected.

The patch is here:

  https://lkml.org/lkml/2010/12/16/74

And my raw email is attached.
Comment 1 André Klapper 2011-01-28 23:08:33 UTC
Is that reproducible?
Comment 2 rostedt 2011-01-29 01:43:18 UTC
Yes. Here's some more information.

I access my email through IMAP
Comment 3 rostedt 2011-01-29 01:50:59 UTC
bah! Somehow my message was committed while I was typing it.

As I was saying...

I access my email through IMAP from another machine in my LAN that is running dovecot.

I just tried appending the bad email in another folder and read it again, and it did the same thing.

I accessed the same email from my Android phone using the same dovecot server and it views it fine.

The Help->About shows this version is 2.30.3 (I use debian testing).
Comment 4 Milan Crha 2011-02-21 10:32:59 UTC
Confirming, I can reproduce it too, with your test message, on actual git master (~2.91.90). Thanks for the data.
Comment 5 Milan Crha 2011-02-21 12:12:00 UTC
Created attachment 181449 [details] [review]
evo patch

for evolution;

I found two bugs in the code, one in evolution, when the line delimiter (\n) was the last letter in the buffer then it was not restored properly in the inline filter, so it made "corrupt" backup data (instead of "+\n" string was backed up "+\0" string).
Comment 6 Milan Crha 2011-02-21 12:15:42 UTC
Created attachment 181450 [details] [review]
eds patch

for evolution-data-server;

The second bug, in eds, when the mime-filter had backed up some data, which were small enough, then the restoration of them didn't happen in a dedicated buffer, but in the 'in' buffer, which means the memory stream or something used to decode the mime part in. Valgrind doesn't catch such things, because one is still in buffer boundaries. This patch makes sure the right buffer is used for backed up data from a mime-filter.
Comment 7 Milan Crha 2011-02-21 12:20:28 UTC
Created commit b0dfd4a in eds master (2.91.91+)
Created commit 065755c in evo master (2.91.91+)
Comment 8 David Woodhouse 2011-03-17 11:43:16 UTC
Created attachment 183621 [details] [review]
EDS 2.32 patch

We should fix this in 2.32 too, since that's our current stable release ... and it's not even capable of displaying a text/plain email without corrupting it, which is kind of embarrassing.

The evo patch backports cleanly; the eds patch needs to be massaged a little to apply to 2.32 (yay for whitespace cleanups :)