From 0e30d51945f1bd64b00b173a47b7b18fd009946e Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 15 Apr 2011 12:31:18 +0000 Subject: [PATCH] IMAP: fix infinite loop detection git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1669 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/imap/ImapConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index b1825db3..1569d6ee 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -632,7 +632,7 @@ public class ImapConnection extends AbstractConnection { lastCommand = null; lastCommandCount = 0; } else { - String command = line.substring(spaceIndex); + String command = line.substring(spaceIndex + 1); if (command.equals(lastCommand)) { lastCommandCount++; if (lastCommandCount > 100 && !"NOOP".equalsIgnoreCase(lastCommand)) {