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.
This commit is contained in:
Martin Holst Swende 2022-06-17 00:44:30 +02:00 committed by qinglin89
parent 816e30108a
commit 237c31870e

@ -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
{