HomePhabricator

Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid…

Description

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

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

Reviewers: Fabien, #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4017

Details

Committed
fpelliccioniWed, Sep 11, 19:46
Pushed
fpelliccioniWed, Sep 11, 19:46
Reviewer
Restricted Project
Differential Revision
D4017: Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...)
Parents
rABC29fec420b3e2: Pull leveldb subtree
Branches
Unknown
Tags
Unknown