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 sadoci committed Jul 7, 2023
1 parent c661275 commit 674ab9c
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 674ab9c

Please sign in to comment.