aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-18 16:17:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-06 10:53:39 +0200
commit2825f46d950ca9b0e269ed8dc6a97c5238a17c30 (patch)
tree1869f93855474b2fe4469351b0dd5ef890bb1fb1 /lib/smtp.c
parent87fefe5ebfa152386396b8e232c7b5b0609f6f35 (diff)
CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size
This is step 3 of #2888. Fixes #2888 Closes #2896
Diffstat (limited to 'lib/smtp.c')
-rw-r--r--lib/smtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index ecf10a41a..50c0b3477 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1563,14 +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 * UPLOAD_BUFSIZE);
+ scratch = newscratch = malloc(2 * data->set.upload_buffer_size);
if(!newscratch) {
failf(data, "Failed to alloc scratch buffer!");
return CURLE_OUT_OF_MEMORY;
}
}
- DEBUGASSERT(UPLOAD_BUFSIZE >= nread);
+ DEBUGASSERT(data->set.upload_buffer_size >= (size_t)nread);
/* Have we already sent part of the EOB? */
eob_sent = smtp->eob;