File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 44
55#include < consensus/amount.h>
66#include < net_processing.h>
7+ #include < netaddress.h>
78#include < netmessagemaker.h>
89#include < pubkey.h>
910#include < test/fuzz/util.h>
@@ -524,7 +525,10 @@ CNetAddr ConsumeNetAddr(FuzzedDataProvider& fuzzed_data_provider) noexcept
524525 } else if (network == Network::NET_INTERNAL) {
525526 net_addr.SetInternal (fuzzed_data_provider.ConsumeBytesAsString (32 ));
526527 } else if (network == Network::NET_ONION) {
527- net_addr.SetSpecial (fuzzed_data_provider.ConsumeBytesAsString (32 ));
528+ auto pub_key{fuzzed_data_provider.ConsumeBytes <uint8_t >(ADDR_TORV3_SIZE)};
529+ pub_key.resize (ADDR_TORV3_SIZE);
530+ const bool ok{net_addr.SetSpecial (OnionToString (pub_key))};
531+ assert (ok);
528532 }
529533 return net_addr;
530534}
You can’t perform that action at this time.
0 commit comments