Bug 163024 - kmail crashes when it downloads a complex mail from pop3
Summary: kmail crashes when it downloads a complex mail from pop3
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-01 21:03 UTC by George Kiagiadakis
Modified: 2008-06-01 23:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Kiagiadakis 2008-06-01 21:03:08 UTC
Version:           1.9.51 (kdepim 4.0.80) (using Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.2.4 (Debian 4.2.4-1) 
OS:                Linux

KMail 4.0.80 is constantly crashing when it downloads a quite complex email from a pop3 server.

The only useful line I can see on the command line output is this:
ASSERT: "i >= 0 && i < size()" in file /usr/include/qt4/QtCore/qbytearray.h, line 383

I have tracked down the offending e-mail that causes the crash and I have uploaded it along with the full output that kmail gives on the command line here:
http://www.csd.uoc.gr/~gkiagiad/kmail-4.0.80-crash-data.tar.bz2

The crash is reproducable if you do on the mail server side:
$ tar xjf kmail-4.0.80-crash-data.tar.bz2
$ cat kmail-4.0.80-crash-offending-mail >> /var/mail/<login>
and then try to download emails from this mail server.

The email is a forward of an html email with a few images.
Pine on the mail server can read it just fine (in text mode) without crashing. In addition, if I try to open the mbox file that I have put in the tarball above (by clicking on it using dolphin), kmail reads the email just fine in both html and text mode!! It's only downloading it from the server that fails.

Note that the email I have put in the tarball is an exact copy of the source code of the email from my mbox in /var/mail/<login> on the mail server.
Comment 1 George Kiagiadakis 2008-06-01 21:12:35 UTC
All right, this is the third time I select "Installed from: Debian testing/unstable packages" in the bug report wizard and instead, I get "Installed from: Compiled sources". I guess this is a bug of the bug tracking system?

Anyway, for your information, I have installed kmail from debian experimental packages. The information on the header is wrong!
Comment 2 Thomas McGuire 2008-06-01 23:34:18 UTC
SVN commit 815465 by tmcguire:

Don't crash on incorrectly encoded RFC2231 strings.
BUG: 163024


 M  +12 -6     kmmsgbase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=815465
Comment 3 Thomas McGuire 2008-06-01 23:40:04 UTC
Note that the attached message is not correctly encoded.
In the first mime-part (message/rfc822), you'll see the filename parameter of the Content-Disposition header field.
That has, as last line, the following:
  filename*3*=%E1%F3%DF%
This is not allowed (a percent-character not followed by two other characters).
I suggest you file a bug at Thunderbird as well, which seems to have produced this message (according to the user-agent field).