-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Crashed at Curl_http_bodysend #12410
Labels
Comments
Can we call Curl_safefree(data->state.formp); when Curl_getformdata return non-zero value to fix this crash? |
Can you provide us an example that reproduces this problem? |
This is a simplified example, although it looks strange, but curl will crash in Curl_http_bodysend(). |
"asdwq/usr/bin/zip" not existed on my computer, so Curl_getformdata will return CURLE_READ_ERROR. |
Thanks, that reproduces for me as well! |
bagder
added a commit
that referenced
this issue
Nov 28, 2023
Based-on-work-by: yushicheng7788 on github Fixes #12410
bagder
added a commit
that referenced
this issue
Nov 28, 2023
Based-on-work-by: yushicheng7788 on github Fixes #12410
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
I use CURLOPT_HTTPPOST to send files, but curl crashed. I think it is caused by the following part of the code.
If Curl_getformdata() returns any error, which will cause data->state.mimepost = data->state.formp; not executed. But if I sent this request again, data->state.formp is not NULL, and data->state.mimepost is NULL, which cause a crash. Is there any optimization method in this case?
I expected the following
Curl will not crash in this case.
curl/libcurl version
8.4.0
operating system
MacOS
The text was updated successfully, but these errors were encountered: