From 786fea2fe83883d18d23b653994642944d336c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 26 Sep 2012 15:20:10 +0200 Subject: Fix another endless loop in imapparser Thanks to Francois Andriot for the patch This resolves Bug 1235 --- kioslaves/imap4/imapparser.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kioslaves/imap4/imapparser.h') 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) { -- cgit v1.2.1