-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURLE_OUT_OF_MEMORY when adding large header after update to 7.71.0 #6681
Comments
Does it always reproduce sometimes or always? Can you give us an example header? |
@jay this is reproducible on every run when the header value is large, eg:
Not a real-life example, but should work for a repro |
bisected to ed35d65 (dynbuf: introduce internal generic dynamic buffer functions). repro:
Line 77 in 2f33be8
Lines 3071 to 3072 in 2f33be8
Lines 78 to 81 in 2f33be8
The solution would be remove the limit. DYN_NO_LIMIT was previously proposed in #5966 |
Thanks, that makes sense - neat quick repro too :) Another option could maybe be to make them configurable as |
I still believe no limit to be bad (because this is used to trap mistakes or malicious use), but I'm all for discussing upping the limit to something larger than 128KB. Maybe go with 1MB here?. I would like to try to avoid having setopts for them as they're so specific and 99.99% of all users would never change them. |
Agreed with no limit not being the best path forward here - I believe 1MB is a sensible value and would cover use-cases like the one here where we could also avoid having to introduce new options. |
I did this
An application I'm working on uses
libcurl
to make HTTP requests to a server and uses the following code pattern to make this request:We compile curl from source with:
Execution logs:
I expected the following
Before version 7.71.0 (tested up to 7.75.0), this worked fine for headers with size up to 1mb but after the update I've started seeing
CURLE_OUT_OF_MEMORY
.I'm not entirely sure what's changed in this version to blow up with OOM exceptions on large headers, but I suspect maybe aee277b as it's the closest change to the issue that I can see. Have not confirmed this however.
curl/libcurl version
7.71.0+
operating system
Amazon Linux 2
I'd really appreciate guidance on this, thanks!
The text was updated successfully, but these errors were encountered: