summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/smtp.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-22 12:41:50 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-22 12:48:58 (GMT)
commite9e8dcee6b21bafdb9593633dc845400bc060983 (patch)
treeadb81a4a209d0d2f02cf1106d5b63dbb9306de24 /Utilities/cmcurl/lib/smtp.c
parentded211ae469530a08774094e1162247117f85ffd (diff)
parent18812a9c3d395b368d8f3d85394b346472c8e858 (diff)
downloadCMake-e9e8dcee6b21bafdb9593633dc845400bc060983.zip
CMake-e9e8dcee6b21bafdb9593633dc845400bc060983.tar.gz
CMake-e9e8dcee6b21bafdb9593633dc845400bc060983.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2018-09-04 (432eb5f5)
Diffstat (limited to 'Utilities/cmcurl/lib/smtp.c')
-rw-r--r--Utilities/cmcurl/lib/smtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Utilities/cmcurl/lib/smtp.c b/Utilities/cmcurl/lib/smtp.c
index 3f3b45a..ecf10a4 100644
--- a/Utilities/cmcurl/lib/smtp.c
+++ b/Utilities/cmcurl/lib/smtp.c
@@ -704,7 +704,6 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
struct smtp_conn *smtpc = &conn->proto.smtpc;
const char *line = data->state.buffer;
size_t len = strlen(line);
- size_t wordlen;
(void)instate; /* no use for this yet */
@@ -739,6 +738,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
/* Loop through the data line */
for(;;) {
size_t llen;
+ size_t wordlen;
unsigned int mechbit;
while(len &&
@@ -1563,13 +1563,14 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
if(!scratch || data->set.crlf) {
oldscratch = scratch;
- scratch = newscratch = malloc(2 * data->set.buffer_size);
+ scratch = newscratch = malloc(2 * UPLOAD_BUFSIZE);
if(!newscratch) {
failf(data, "Failed to alloc scratch buffer!");
return CURLE_OUT_OF_MEMORY;
}
}
+ DEBUGASSERT(UPLOAD_BUFSIZE >= nread);
/* Have we already sent part of the EOB? */
eob_sent = smtp->eob;