diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-02-08 11:41:39 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-02-08 12:30:21 +0100 |
commit | 6fc656a410b6fa469be258414f1e26cd4b6025af (patch) | |
tree | 4813191e90ece4956a1e0c95ff459cb2cf1b142a /test | |
parent | b9b26d9c3615d15669ae0a049c1dede39a9e59a9 (diff) | |
parent | d855e4cac8303ad4e34ac31cfa7634286589ce99 (diff) |
Merge #14242: Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...)
d855e4cac8303ad4e34ac31cfa7634286589ce99 Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...) (practicalswift)
Pull request description:
Avoid triggering undefined behaviour (`std::memset(nullptr, 0, 0)`) if an invalid string is passed to `DecodeSecret(...)`.
Background reading: [memcpy (and friends) with NULL pointers](https://www.imperialviolet.org/2016/06/26/nonnull.html)
Steps to reproduce:
```
./configure --with-sanitizers=undefined && make check && ./test/functional/test_runner.py
```
Tree-SHA512: b8325ced4f724d9c03065e0747af56b1f297a90d9fb09a24d46c3231a90dce3df6299f2c41f863b5cec18eaeded7b46ee4b93d9a52adc2541eb4c44d2c0965d9
Diffstat (limited to 'test')
-rw-r--r-- | test/sanitizer_suppressions/ubsan | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan index f0107f1361..d55119b266 100644 --- a/test/sanitizer_suppressions/ubsan +++ b/test/sanitizer_suppressions/ubsan @@ -4,7 +4,6 @@ bool:wallet/wallet.cpp float-divide-by-zero:policy/fees.cpp float-divide-by-zero:validation.cpp float-divide-by-zero:wallet/wallet.cpp -nonnull-attribute:support/cleanse.cpp unsigned-integer-overflow:arith_uint256.h unsigned-integer-overflow:basic_string.h unsigned-integer-overflow:bench/bench.h |