Skip to content

Commit 0f89e86

Browse files
committed
Merge bitcoin/bitcoin#29667: fuzz: actually test garbage >64b in p2p transport test
626f8e3 fuzz: actually test garbage >64b in p2p transport test (Pieter Wuille) Pull request description: This fixes an oversight from #28196: in the `p2p_transport_bidirectional_v2` fuzz test, when the desired garbage length is over 64 bytes, the code would actually use garbage length 0. Fix this. ACKs for top commit: instagibbs: ACK bitcoin/bitcoin@626f8e3 brunoerg: crACK 626f8e3 Tree-SHA512: f6346367adb10464b6c9d20aef43625531d2a4d8110887ad03214b8c1907b83560f2dd5b5415e2180a40b4cd276d51881b32b60c740471b5c6bb218aa19848d8
2 parents 5d045c3 + 626f8e3 commit 0f89e86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/fuzz/p2p_transport_serialization.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ std::unique_ptr<Transport> MakeV2Transport(NodeId nodeid, bool initiator, RNG& r
354354
} else {
355355
// If it's longer, generate it from the RNG. This avoids having large amounts of
356356
// (hopefully) irrelevant data needing to be stored in the fuzzer data.
357+
garb.resize(garb_len);
357358
for (auto& v : garb) v = uint8_t(rng());
358359
}
359360
// Retrieve entropy

0 commit comments

Comments
 (0)