Check returned value of fopen() #9775

issue viennadd openend this issue on February 16, 2017
  1. viennadd commented at 10:52 am on February 16, 2017: none
    util.cpp#L216 if fopen failed, a null file pointer could be passed to FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);
  2. fanquake renamed this:
    checks of returned value of fopen
    Check of returned value of fopen()
    on Feb 16, 2017
  3. fanquake renamed this:
    Check of returned value of fopen()
    Check returned value of fopen()
    on Feb 16, 2017
  4. MarcoFalke added the label Easy to implement on Feb 18, 2017
  5. kirit93 commented at 6:24 am on February 19, 2017: contributor
    As I’ve understood the problem, the solution would be simply passing a “NULL” to FileWriteStr as the second argument and an empty string as the first argument. Is that correct or did you have something else in mind?
  6. laanwj commented at 1:02 pm on February 19, 2017: member
    I’d say the most straightforward and correct solution is to put everything until the delete vMsgsBeforeOpenLog under the if (fileout) conditional.
  7. kirit93 referenced this in commit 8a2f559850 on Feb 19, 2017
  8. viennadd closed this on Feb 19, 2017

  9. kirit93 referenced this in commit 40f11f8872 on Feb 20, 2017
  10. laanwj referenced this in commit 8ad31f9aa3 on Feb 21, 2017
  11. laanwj referenced this in commit e22c0671c7 on Feb 21, 2017
  12. codablock referenced this in commit 15a035b9c0 on Jan 26, 2018
  13. andvgal referenced this in commit 668a1171d2 on Jan 6, 2019
  14. CryptoCentric referenced this in commit 0865c59b79 on Feb 27, 2019
  15. DrahtBot 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: 2024-11-17 12:12 UTC

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