summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/pop3.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2021-05-26 22:25:25 +0300
committerdartraiden <wowemuh@gmail.com>2021-05-26 22:26:43 +0300
commit43f100ad4b599dbc564f9920e63afdc242f0a27c (patch)
treefc63fd04b0dbb0a3b1e59a10a1f9e2217388aeb4 /libs/libcurl/src/pop3.c
parent7d4ed0164a32a3667fb3786fb538fc083153883a (diff)
libcurl: update to 7.77
Diffstat (limited to 'libs/libcurl/src/pop3.c')
-rw-r--r--libs/libcurl/src/pop3.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/libcurl/src/pop3.c b/libs/libcurl/src/pop3.c
index ccfebd02af..9b6ea64804 100644
--- a/libs/libcurl/src/pop3.c
+++ b/libs/libcurl/src/pop3.c
@@ -131,6 +131,7 @@ const struct Curl_handler Curl_handler_pop3 = {
pop3_disconnect, /* disconnect */
ZERO_NULL, /* readwrite */
ZERO_NULL, /* connection_check */
+ ZERO_NULL, /* attach connection */
PORT_POP3, /* defport */
CURLPROTO_POP3, /* protocol */
CURLPROTO_POP3, /* family */
@@ -159,6 +160,7 @@ const struct Curl_handler Curl_handler_pop3s = {
pop3_disconnect, /* disconnect */
ZERO_NULL, /* readwrite */
ZERO_NULL, /* connection_check */
+ ZERO_NULL, /* attach connection */
PORT_POP3S, /* defport */
CURLPROTO_POP3S, /* protocol */
CURLPROTO_POP3, /* family */
@@ -709,7 +711,7 @@ static CURLcode pop3_state_capa_resp(struct Curl_easy *data, int pop3code,
for(;;) {
size_t llen;
size_t wordlen;
- unsigned int mechbit;
+ unsigned short mechbit;
while(len &&
(*line == ' ' || *line == '\t' ||
@@ -1515,8 +1517,17 @@ CURLcode Curl_pop3_write(struct Curl_easy *data, char *str, size_t nread)
if(prev) {
/* If the partial match was the CRLF and dot then only write the CRLF
as the server would have inserted the dot */
- result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
- strip_dot ? prev - 1 : prev);
+ if(strip_dot && prev - 1 > 0) {
+ result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
+ prev - 1);
+ }
+ else if(!strip_dot) {
+ result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
+ prev);
+ }
+ else {
+ result = CURLE_OK;
+ }
if(result)
return result;