cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl (WinSSL) fails with memory buffer error (fwd)

From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Fri, 28 Sep 2012 22:44:11 +0200

Hi there,

> ---------- Forwarded message ----------
> Date: Wed, 26 Sep 2012 17:36:15
> From: James A <jmaxhaven_at_yahoo.co.uk>
> To: "curl-users_at_cool.haxx.se" <curl-users_at_cool.haxx.se>
> Subject: curl (WinSSL) fails with memory buffer error
>
> Hello
> I am using curl 7.27.0 WinSSL.
> "curl --version" gives:
> curl 7.27.0 (i386-pc-win32) libcurl/7.27.0 WinSSL zlib/1.2.7
>
> When downloading a file over a secure connection (https://)
> curl fails with the following error message:
> "curl: (27) schannel: memory buffer size limit reached"
>
> I have tried this on several computers, with the same result.
>
> If I re-run curl with the -v (verbose) flag set, there are
> many many lines of messages. Here is a sample of the last few
> lines:
> * schannel: encrypted data buffer: offset 12470 length 32768
> * schannel: failed to decrypt data, need more data
> * schannel: client wants to read 16384 bytes
> * schannel: encrypted data buffer: offset 12470 length 32768
> * schannel: encrypted data got 8412
> * schannel: encrypted data buffer: offset 20882 length 32768
> * schannel: decrypted data length: 16384
> * schannel: decrypted data added: 16384
> * schannel: decrypted data cached: offset 246145 length 262144
> * schannel: encrypted data length: 4477
> * schannel: encrypted data cached: offset 4477 length 32768
> * schannel: failed to decrypt data, need more data
> * schannel: client wants to read 16384 bytes
> * schannel: encrypted data buffer: offset 4477 length 32768
> * schannel: encrypted data got 14020
> * schannel: encrypted data buffer: offset 18497 length 32768
> * schannel: decrypted data length: 16384
> * schannel: memory buffer size limit reached
>
> At this point, curl terminates and closes the connection.

I think the problem is clear: The buffer size limit of the schannel
implementation is reached. This is caused by the fact that curl wants
to read more data than what is available in the decrypted data buffer
which then leads to more data being received into the encrypted data
buffer.

Question: Why does curl use such a big chunk size?
Possible solution: Increase the schannel buffers to hold at least that
chunk size * 2

Best regards,
Marc
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-28