aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-02-24 19:23:33 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-02-24 19:23:33 +0000
commitd23d2f2bd8dc9574113ed45303493c3dd5d94557 (patch)
tree1ea3c59f78b7cda315c00966ce25e82e012e89ff
parent37f0caeabdf41413e4c993b439239be9b193d87b (diff)
imap: Added check for new internal imap response code
-rw-r--r--lib/imap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 0c0154824..5d94548a3 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1283,6 +1283,10 @@ static CURLcode imap_statemach_act(struct connectdata *conn)
if(result)
return result;
+ /* Was there an error parsing the response line? */
+ if(imapcode == -1)
+ return CURLE_FTP_WEIRD_SERVER_REPLY;
+
if(imapcode) {
/* We have now received a full IMAP server response */
switch(imapc->state) {