summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-09-26 15:20:10 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-09-26 17:38:04 +0200
commit786fea2fe83883d18d23b653994642944d336c3f (patch)
tree45550f6651999846ba49a916e0313cc6f5b75692
parent590161fd805b5d9c397a5dc192996d13acdbaff6 (diff)
downloadtdepim-786fea2fe83883d18d23b653994642944d336c3f.tar.gz
tdepim-786fea2fe83883d18d23b653994642944d336c3f.zip
Fix another endless loop in imapparser
Thanks to Francois Andriot for the patch This resolves Bug 1235
-rw-r--r--kioslaves/imap4/imapparser.h6
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)
{