Skip to content

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

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/sendf-uninit
Closed

Curl_client_read: init two variables to avoid using them uninited#13419
bagder wants to merge 2 commits into
masterfrom
bagder/sendf-uninit

Conversation

@bagder

@bagder bagder commented Apr 19, 2024

Copy link
Copy Markdown
Member

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

icing commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

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

bagder commented Apr 19, 2024

Copy link
Copy Markdown
Member Author

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.

2 participants