diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2012-09-26 15:20:10 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-09-26 17:38:04 +0200 |
commit | 786fea2fe83883d18d23b653994642944d336c3f (patch) | |
tree | 45550f6651999846ba49a916e0313cc6f5b75692 /kioslaves | |
parent | 590161fd805b5d9c397a5dc192996d13acdbaff6 (diff) | |
download | tdepim-786fea2fe83883d18d23b653994642944d336c3f.tar.gz tdepim-786fea2fe83883d18d23b653994642944d336c3f.zip |
Fix another endless loop in imapparser
Thanks to Francois Andriot for the patch
This resolves Bug 1235
Diffstat (limited to 'kioslaves')
-rw-r--r-- | kioslaves/imap4/imapparser.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h index 61e8a4393..d24e9c813 100644 --- a/kioslaves/imap4/imapparser.h +++ b/kioslaves/imap4/imapparser.h @@ -94,7 +94,11 @@ public: } uint length() { - return data.size() - pos; + if( pos < data.size() ) { + return data.size() - pos; + } else { + return 0; + } } void fromString(const TQString &s) { |