Skip to content
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

Curl_client_read: init two variables to avoid using them uninited #13419

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 19, 2024

Within the function we trace the values independently of the Curl_creader_read() returning error or not, which could leave them uninitialized.

Spotted by CodeSonar

Within the function we trace the values independently of the
Curl_creader_read() returning error or not, which could leave them
uninitialized.

Spotted by CodeSonar
@icing
Copy link
Contributor

icing commented Apr 19, 2024

Hmm, I do prefer - maybe just taste - to have a call with out parameters to always set values. The caller should not have to worry about that.

Which probably means the fix should be in Curl_creader_read() itself?

@bagder
Copy link
Member Author

bagder commented Apr 19, 2024

Like this?

@bagder bagder closed this in fe226af Apr 19, 2024
@bagder bagder deleted the bagder/sendf-uninit branch May 6, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants