Page MenuHomePhabricator

Merge #13148: logging: Fix potential use-after-free in LogPrintStr(...)
ClosedPublic

Authored by nakihito on Fri, Aug 30, 01:32.

Details

Summary

0bd4cd3 logging: remove unused return value from LogPrintStr (practicalswift)
76f344d logging: Fix potential use-after-free in LogPrintStr(...) (practicalswift)

Pull request description:

Fix potential use-after-free in `LogPrintStr(...)`.

`freopen(…)` frees `m_fileout`.

Tree-SHA512: ceee1f659c10a21525aa648377afeea0a37016339f5269dea54850ba3b475aa316f4931081655717b65f981598fdc9d79a1e79e55f7084c242eeb7bf372bc4b6

Backport of Core PR13148
https://github.com/bitcoin/bitcoin/pull/13148/

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Fri, Aug 30, 01:32
Owners added a reviewer: Restricted Owners Package.Fri, Aug 30, 01:32
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Aug 30, 01:32
nakihito planned changes to this revision.Fri, Aug 30, 01:44

Not a complete fix. https://github.com/bitcoin/bitcoin/pull/13159 fixes remaining issues.

deadalnix accepted this revision.Sat, Aug 31, 14:37
This revision is now accepted and ready to land.Sat, Aug 31, 14:37