-
Notifications
You must be signed in to change notification settings - Fork 238
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
Implementation of the error buffer in Easy2
is unsound
#589
Comments
I see a couple of ways how this could be solved:
I prefer option 1. because I'd assume that it is always okay to read the error buffer whenever our machine is not executing code from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl::easy::Easy2::default_configure
registers an error buffer like this:CURLOPT_ERRORBUFFER
requires mutable access over the buffer, and it is important that the buffer pointer is still valid later on when further library calls are made. However,error_buf
is borrowed immutably and only for a short time (until the end of the statement).(A mutable borrow might look like this:
That does not solve the lifetime problem, though.)
The text was updated successfully, but these errors were encountered: