mirror of
https://github.com/curl/curl.git
synced 2026-07-26 07:47:33 +03:00
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.
This commit is contained in:
parent
0160cb2e19
commit
2c6b41e98a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue