From e40e9d7f0decc799e3ccfe2c418632f8bb52031a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Apr 2017 14:38:34 +0200 Subject: buffer: use data->set.buffer_size instead of BUFSIZE ... to properly use the dynamically set buffer size! --- lib/transfer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index bafb6e9c8..0bba3f529 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -680,8 +680,6 @@ static CURLcode readwrite_data(struct Curl_easy *data, excess = (size_t)(k->bytecount + nread - k->maxdownload); if(excess > 0 && !k->ignorebody) { if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - /* The 'excess' amount below can't be more than BUFSIZE which - always will fit in a size_t */ infof(data, "Rewinding stream by : %zu" " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T @@ -936,7 +934,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, (data->set.crlf))) { /* Do we need to allocate a scratch buffer? */ if(!data->state.scratch) { - data->state.scratch = malloc(2 * BUFSIZE); + data->state.scratch = malloc(2 * data->set.buffer_size); if(!data->state.scratch) { failf(data, "Failed to alloc scratch buffer!"); -- cgit v1.2.3