Skip to content

Commit

Permalink
tests/fuzzers/rlp: avoid very large input (ethereum#25109)
Browse files Browse the repository at this point in the history
The oss-fuzz engine crashes due to stack overflow decoding a large nested
structure into a interface{}. This PR limits the size of the input data, so
should avoid such crashes.
  • Loading branch information
holiman authored and blakehhuynh committed Oct 7, 2022
1 parent 502553d commit 15af660
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/fuzzers/rlp/rlp_fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func Fuzz(input []byte) int {
if len(input) == 0 {
return 0
}
if len(input) > 500*1024 {
return 0
}

var i int
{
Expand Down

0 comments on commit 15af660

Please sign in to comment.