[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepimlibs/kioslave/imap4
From:       Tomáš Trnka <tomtrnka () seznam ! cz>
Date:       2010-01-13 15:04:23
Message-ID: 1263395063.210981.3132.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1074158 by ttrnka:

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

BUG:203715



 M  +3 -4      imapparser.cpp  


--- trunk/KDE/kdepimlibs/kioslave/imap4/imapparser.cpp #1074157:1074158
@@ -262,13 +262,12 @@
   }
   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())
     {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic