Fix Issue #9775 (Check returned value of fopen) #9798

pull kirit93 wants to merge 1 commits into bitcoin:master from kirit93:issue changing 1 files +8 −7
  1. kirit93 commented at 1:16 PM on February 19, 2017: contributor

    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

  2. fanquake added the label Utils and libraries on Feb 19, 2017
  3. in src/util.cpp:None in 8a2f559850 outdated
     163 | @@ -164,7 +164,7 @@ class CInit
     164 |              delete ppmutexOpenSSL[i];
     165 |          OPENSSL_free(ppmutexOpenSSL);
     166 |      }
     167 | -}
     168 | +};
    


    laanwj commented at 1:19 PM on February 19, 2017:

    Adding a ; here is wrong.


    kirit93 commented at 3:21 PM on February 19, 2017:

    I removed the semicolon in the latest commit.

  4. MarcoFalke commented at 4:02 PM on February 19, 2017: member

    Please also remove the trailing whitespace

    On Sun, Feb 19, 2017 at 4:21 PM, Kirit Thadaka notifications@github.com wrote:

    @kirit93 commented on this pull request.

    In src/util.cpp https://github.com/bitcoin/bitcoin/pull/9798#discussion_r101920376:

    @@ -164,7 +164,7 @@ class CInit delete ppmutexOpenSSL[i]; OPENSSL_free(ppmutexOpenSSL); } -} +};

    I removed the semicolon in the latest commit.

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/pull/9798#discussion_r101920376, or mute the thread https://github.com/notifications/unsubscribe-auth/AGGmv1pBwoosVmQm6Mxe3bMV5gNbEUP6ks5reF3qgaJpZM4MFdXS .

  5. kirit93 commented at 5:13 PM on February 19, 2017: contributor

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

  6. laanwj commented at 4:15 PM on February 20, 2017: member

    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)

  7. laanwj renamed this:
    Fix Issue #9775
    Fix Issue #9775 (Check returned value of fopen)
    on Feb 20, 2017
  8. Fix for issue #9775. Added check for open() returning a NULL pointer. 40f11f8872
  9. kirit93 force-pushed on Feb 20, 2017
  10. laanwj merged this on Feb 21, 2017
  11. laanwj closed this on Feb 21, 2017

  12. laanwj referenced this in commit 8ad31f9aa3 on Feb 21, 2017
  13. laanwj referenced this in commit e22c0671c7 on Feb 21, 2017
  14. codablock referenced this in commit 15a035b9c0 on Jan 26, 2018
  15. andvgal referenced this in commit 668a1171d2 on Jan 6, 2019
  16. CryptoCentric referenced this in commit 0865c59b79 on Feb 27, 2019
  17. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me