Page MenuHomePhabricator

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

Authored by nakihito on Aug 30 2019, 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
Branch
PR13148
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7287
Build 12619: Bitcoin ABC Buildbot (legacy)
Build 12618: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Aug 30 2019, 01:32

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

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