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:45:53 +0200 |
commit | 1a0e1c584f58b3437a7292c843d10bdd2c34ac65 (patch) | |
tree | d83f5c116c1be3ae8769da573ee39b0b3db7a257 /kioslaves | |
parent | 9dc91538a908afdd21be11ea3a2b5b3619b0513b (diff) | |
download | tdepim-1a0e1c584f58b3437a7292c843d10bdd2c34ac65.tar.gz tdepim-1a0e1c584f58b3437a7292c843d10bdd2c34ac65.zip |
Fix another endless loop in imapparserv3.5.13.1
Thanks to Francois Andriot for the patch
This resolves Bug 1235
(cherry picked from commit 786fea2fe83883d18d23b653994642944d336c3f)
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) { |