summaryrefslogtreecommitdiffstats
path: root/redhat/kdepim/kdepim-3.5.13-fix_kio_imap4_infinite_loop.patch
blob: 90e0a12690cdd4739e95399a83f27f79ca703221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- kdepim/kioslaves/imap4/imapparser.cc.ORI	2012-05-27 23:40:50.101207608 +0200
+++ kdepim/kioslaves/imap4/imapparser.cc	2012-05-27 23:43:23.264547024 +0200
@@ -277,11 +277,11 @@
   }
   cmd = sendCommand (new imapCommand ("AUTHENTICATE", firstCommand.latin1()));
 
-  while ( true )
+  int pl = 0;
+  while ( pl != -1 && !cmd->isComplete () )
   {
     //read the next line
-    while (parseLoop() == 0) ;
-    if ( cmd->isComplete() ) break;
+    while ((pl = parseLoop()) == 0) ;
 
     if (!continuation.isEmpty())
     {