From 2825f46d950ca9b0e269ed8dc6a97c5238a17c30 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 18 Aug 2018 16:17:05 +0200 Subject: CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size This is step 3 of #2888. Fixes #2888 Closes #2896 --- lib/smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/smtp.c') 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; -- cgit v1.2.3