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 jagdeep sidhu committed Jun 22, 2022
1 parent 60cf2d1 commit 4298a72
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 4298a72

Please sign in to comment.