Page MenuHomePhabricator

Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...)
ClosedPublic

Authored by fpelliccioni on Fri, Sep 6, 16:35.

Details

Summary

Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...).

Backport of Bitcoin Core PR14242
https://github.com/bitcoin/bitcoin/pull/14242

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

fpelliccioni created this revision.Fri, Sep 6, 16:35
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Sep 6, 16:35
jasonbcox accepted this revision.Fri, Sep 6, 17:25
This revision is now accepted and ready to land.Fri, Sep 6, 17:25