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

tool_cb_hdr: handle failure of rename() #3140

merged 1 commit into from Oct 17, 2018


Copy link

commented Oct 15, 2018

Detected by Coverity.


This comment has been minimized.

Copy link

commented Oct 16, 2018

In the case of failure outs->filename is freed but then never reassigned to so couldn't that lead to a double free, I suggest change it to Curl_safefree instead. Also braces for the if warnf since it spans more than one line.

tool_cb_hdr: handle failure of rename()
Detected by Coverity.

Closes #3140
Reviewed-by: Jay Satiro

@kdudka kdudka force-pushed the kdudka:rename-failure branch from d84b547 to 6b6ba1d Oct 17, 2018


This comment has been minimized.

Copy link
Collaborator Author

commented Oct 17, 2018

@jay Thanks for review! PR updated...

bagder approved these changes Oct 17, 2018

@kdudka kdudka merged commit 6b6ba1d into curl:master Oct 17, 2018

5 of 6 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
LGTM analysis: C/C++ No alert changes
LGTM analysis: Python No code changes detected
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage decreased (-0.09%) to 73.522%

@kdudka kdudka deleted the kdudka:rename-failure branch Oct 17, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
3 participants
You can’t perform that action at this time.