Bug 213460 - KMail crash when reply-all hit on SOME emails. (null dereference)
Summary: KMail crash when reply-all hit on SOME emails. (null dereference)
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-06 19:59 UTC by Daniel Kulp
Modified: 2009-11-11 16:10 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 Daniel Kulp 2009-11-06 19:59:58 UTC
Version:            (using KDE 4.3.3)
Compiler:          gcc version 4.3.4 
OS:                Linux
Installed from:    Gentoo Packages


In objecttreeparser.cpp at line 1314, the current code looks like:

      if ( !dataHtml && mReader->htmlMail() ) {

However, in SOME cases, when I hit reply-all, the mReader field is null.   If I change the code to:
if ( !dataHtml && mReader && mReader->htmlMail() ) {

to make sure the null is not dereferenced, then everything seems to work fine for me.  I'm NOT sure why mReader is null, but there ARE checks later in the same method for mReader being null so I assume that it's allowed.
Comment 1 Allen Winter 2009-11-07 15:49:27 UTC
SVN commit 1046105 by winterz:

add a crash guard for mReader when reply-all on html emails
thanks for the patch Daniel.
BUG: 213460
MERGE: 4.3,e4


 M  +1 -1      objecttreeparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1046105
Comment 2 Allen Winter 2009-11-07 15:50:30 UTC
SVN commit 1046106 by winterz:

Backport r1046105 by winterz from trunk to the 4.3 branch:

add a crash guard for mReader when reply-all on html emails
thanks for the patch Daniel.
CCBUG: 213460
MERGE: 4.3,e4



 M  +1 -1      objecttreeparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1046106
Comment 3 Thomas McGuire 2009-11-11 16:10:12 UTC
Thanks Daniel for the patch, that was the correct way to fix it.

My fault, I forgot again that the objecttreeparser can be used without having a reader widget.