imap: Added check for new internal imap response code
authorSteve Holme <steve_holme@hotmail.com>
Sun, 24 Feb 2013 19:23:33 +0000 (19:23 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 24 Feb 2013 19:23:33 +0000 (19:23 +0000)
lib/imap.c

index 0c01548..5d94548 100644 (file)
@@ -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) {