mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Make DecodeBase{32,64} always return vector, not string
Base32/base64 are mechanisms for encoding binary data. That they'd decode to a string is just bizarre. The fact that they'd do that based on the type of input arguments even more so.
This commit is contained in:
@@ -32,7 +32,8 @@ FUZZ_TARGET_INIT(psbt, initialize_psbt)
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
PartiallySignedTransaction psbt_mut;
|
||||
std::string error;
|
||||
if (!DecodeRawPSBT(psbt_mut, fuzzed_data_provider.ConsumeRandomLengthString(), error)) {
|
||||
auto str = fuzzed_data_provider.ConsumeRandomLengthString();
|
||||
if (!DecodeRawPSBT(psbt_mut, MakeByteSpan(str), error)) {
|
||||
return;
|
||||
}
|
||||
const PartiallySignedTransaction psbt = psbt_mut;
|
||||
@@ -79,7 +80,8 @@ FUZZ_TARGET_INIT(psbt, initialize_psbt)
|
||||
}
|
||||
|
||||
PartiallySignedTransaction psbt_merge;
|
||||
if (!DecodeRawPSBT(psbt_merge, fuzzed_data_provider.ConsumeRandomLengthString(), error)) {
|
||||
str = fuzzed_data_provider.ConsumeRandomLengthString();
|
||||
if (!DecodeRawPSBT(psbt_merge, MakeByteSpan(str), error)) {
|
||||
psbt_merge = psbt;
|
||||
}
|
||||
psbt_mut = psbt;
|
||||
|
||||
Reference in New Issue
Block a user