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 4
4
5
5
#include < consensus/amount.h>
6
6
#include < net_processing.h>
7
+ #include < netaddress.h>
7
8
#include < netmessagemaker.h>
8
9
#include < pubkey.h>
9
10
#include < test/fuzz/util.h>
@@ -524,7 +525,10 @@ CNetAddr ConsumeNetAddr(FuzzedDataProvider& fuzzed_data_provider) noexcept
524
525
} else if (network == Network::NET_INTERNAL) {
525
526
net_addr.SetInternal (fuzzed_data_provider.ConsumeBytesAsString (32 ));
526
527
} 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);
528
532
}
529
533
return net_addr;
530
534
}
You can’t perform that action at this time.
0 commit comments