aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-04-18 15:01:57 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-04-18 15:01:57 +0100
commit2c6b41e98a566486877938cfeaba4c946388485a (patch)
tree04885e640fa25baec865335de7729bd98ff69616 /lib
parent0160cb2e194be3c9eaeb7903998d60bbdf4f8834 (diff)
imap: Fixed untagged response detection when no data after command
Should a command return untagged responses that contained no data then the imap_matchresp() function would not detect them as valid responses, as it wasn't taking the CRLF characters into account at the end of each line.
Diffstat (limited to 'lib')
-rw-r--r--lib/imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/imap.c b/lib/imap.c
index a3dd49926..3881d6189 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -258,7 +258,7 @@ static bool imap_matchresp(const char *line, size_t len, const char *cmd)
/* Does the command name match and is it followed by a space character or at
the end of line? */
if(line + cmd_len <= end && Curl_raw_nequal(line, cmd, cmd_len) &&
- (line[cmd_len] == ' ' || line + cmd_len == end))
+ (line[cmd_len] == ' ' || line + cmd_len + 2 == end))
return TRUE;
return FALSE;