Skip to content

Conversation

@kirit93
Copy link
Contributor

@kirit93 kirit93 commented Feb 19, 2017

Making sure file is opened before writing string to file to avoid seg faults in case open() returns a NULL pointer.

Attempts to fix #9775

src/util.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a ; here is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the semicolon in the latest commit.

@maflcko
Copy link
Member

maflcko commented Feb 19, 2017 via email

@kirit93
Copy link
Contributor Author

kirit93 commented Feb 19, 2017

Hey I just noticed this issue has been closed. Do we still need this fix?

@laanwj
Copy link
Member

laanwj commented Feb 20, 2017

This issue hasn't been closed, we still need it. There were just some comments.

Looks good to me now. Could you squash to one commit? (e.g. follow https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits)

@laanwj laanwj changed the title Fix Issue #9775 Fix Issue #9775 (Check returned value of fopen) Feb 20, 2017
@laanwj laanwj merged commit 40f11f8 into bitcoin:master Feb 21, 2017
laanwj added a commit that referenced this pull request Feb 21, 2017
40f11f8 Fix for issue #9775. Added check for open() returning a NULL pointer. (kirit93)
laanwj pushed a commit that referenced this pull request Feb 21, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Jan 26, 2018
…open)

40f11f8 Fix for issue bitcoin#9775. Added check for open() returning a NULL pointer. (kirit93)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…open)

40f11f8 Fix for issue bitcoin#9775. Added check for open() returning a NULL pointer. (kirit93)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
…open)

40f11f8 Fix for issue bitcoin#9775. Added check for open() returning a NULL pointer. (kirit93)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check returned value of fopen()

4 participants