summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/smtp.c
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-17 12:36:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-17 12:36:24 +0300
commitfe2500aa99137c9ce35907c118745d65a0c0c07e (patch)
tree5b4024359b5344b1490f7568bfb6dec897cd1aae /libs/libcurl/src/smtp.c
parentadbda1ab567b2baf45c80a62a6aa4c3171a5c2e3 (diff)
libcurl updated to 7.66
Diffstat (limited to 'libs/libcurl/src/smtp.c')
-rw-r--r--libs/libcurl/src/smtp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libs/libcurl/src/smtp.c b/libs/libcurl/src/smtp.c
index e10d0fbfc9..65220b0f68 100644
--- a/libs/libcurl/src/smtp.c
+++ b/libs/libcurl/src/smtp.c
@@ -95,8 +95,7 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
static CURLcode smtp_connect(struct connectdata *conn, bool *done);
static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
-static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
- int numsocks);
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks);
static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
static CURLcode smtp_setup_connection(struct connectdata *conn);
static CURLcode smtp_parse_url_options(struct connectdata *conn);
@@ -715,7 +714,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
result = CURLE_REMOTE_ACCESS_DENIED;
}
}
- else {
+ else if(len >= 4) {
line += 4;
len -= 4;
@@ -786,6 +785,10 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
result = smtp_perform_authentication(conn);
}
}
+ else {
+ failf(data, "Unexpectedly short EHLO response");
+ result = CURLE_WEIRD_SERVER_REPLY;
+ }
return result;
}
@@ -1114,10 +1117,9 @@ static CURLcode smtp_init(struct connectdata *conn)
}
/* For the SMTP "protocol connect" and "doing" phases only */
-static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
- int numsocks)
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks)
{
- return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
+ return Curl_pp_getsock(&conn->proto.smtpc.pp, socks);
}
/***********************************************************************