Skip to content

Commit e076043

Browse files
holimanblakehhuynh
authored andcommitted
tests/fuzzers/rlp: avoid very large input (ethereum#25109)
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.
1 parent 52281e0 commit e076043

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/fuzzers/rlp/rlp_fuzzer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ func Fuzz(input []byte) int {
4040
if len(input) == 0 {
4141
return 0
4242
}
43+
if len(input) > 500*1024 {
44+
return 0
45+
}
4346

4447
var i int
4548
{

0 commit comments

Comments
 (0)