Unverified Commit 01e5e9c2 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

tests/fuzzers/rlp: avoid very large input (#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.
parent ba99e192
...@@ -40,6 +40,9 @@ func Fuzz(input []byte) int { ...@@ -40,6 +40,9 @@ func Fuzz(input []byte) int {
if len(input) == 0 { if len(input) == 0 {
return 0 return 0
} }
if len(input) > 500*1024 {
return 0
}
var i int var i int
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment