Bug 261075 - Crash when replying to a certain email
Summary: Crash when replying to a certain email
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 2.0.89
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 15:37 UTC by Thiago Macieira
Modified: 2011-05-15 11:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Mail (mbox) that causes kmail to crash (14.49 KB, text/plain)
2010-12-23 15:37 UTC, Thiago Macieira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Macieira 2010-12-23 15:37:26 UTC
Created attachment 55187 [details]
Mail (mbox) that causes kmail to crash

Version:           2.0.89 (using Devel) 
OS:                Linux

When I hit R on a certain email (including the attached one with 'x' only), KMail crashes. It apparently enters an infinite loop in KPIMTextEdit::TextUtils::flowText.

Reproducible: Always

Steps to Reproduce:
1. Put the attached email in a mail folder
2. Hit R

Actual Results:  
Crash


OS: Linux (i686) release 2.6.35.6-desktop-1mnb
Compiler: gcc
Comment 1 Tobias Koenig 2010-12-31 15:55:15 UTC
SVN commit 1210462 by tokoe:

Prevent maxLength to become smaller than indent.length

Since indent.length is substracted from maxLength, we have to
make sure it is > indent.length+1, otherwise maxLength will be
negative and the while loop will never terminated :/

BUG: 261075


 M  +3 -0      textutils.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1210462
Comment 2 Tobias Koenig 2011-05-15 11:36:40 UTC
Git commit 3fd56352f4094697b231305b7a10c8581c42c9bd by Tobias Koenig.
Committed on 31/12/2010 at 15:54.
Pushed by tokoe into branch '4.6'.

Prevent maxLength to become smaller than indent.length

Since indent.length is substracted from maxLength, we have to
make sure it is > indent.length+1, otherwise maxLength will be
negative and the while loop will never terminated :/

BUG: 261075

svn path=/trunk/KDE/kdepimlibs/; revision=1210462
(cherry picked from commit ccf2c550b3b466c30b1a440cd4d3d1be7815a8ec)

M  +3    -0    kpimtextedit/textutils.cpp     

http://commits.kde.org/kdepimlibs/3fd56352f4094697b231305b7a10c8581c42c9bd