summaryrefslogtreecommitdiff
path: root/misc/kdepimlibs4/patches/patch-aa
blob: c8c3b7507e01c133df7c2e0a0cbf6d512fd8f853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-aa,v 1.1 2010/01/17 11:27:55 markd Exp $

KDE SVN commit r1074158 by ttrnka:

Properly check errors during authentication to avoid falling into an
infinite loop.

--- kioslave/imap4/imapparser.cpp.orig	2009-05-14 17:26:01.000000000 +0000
+++ kioslave/imap4/imapparser.cpp
@@ -262,13 +262,12 @@ imapParser::clientAuthenticate ( KIO::Sl
   }
   cmd = sendCommand (CommandPtr(new imapCommand ("AUTHENTICATE", firstCommand.toLatin1())));
 
-  while ( true )
-  {
+  int pl = 0;
+  while ( pl != -1 && !cmd->isComplete () ) {
     //read the next line
-    while (parseLoop() == 0) {
+    while ( ( pl = parseLoop() ) == 0) {
       ;
     }
-    if ( cmd->isComplete() ) break;
 
     if (!continuation.isEmpty())
     {