good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit ebb9591c authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub
Browse files

crypto/bn256: fix bn256Mul fuzzer to not hang on large input (#21872)


* crypto/bn256: fix bn256Mul fuzzer to not hang on large input

* Update crypto/bn256/bn256_fuzz.go

Co-authored-by: default avatarligi <ligi@ligi.de>

Co-authored-by: default avatarligi <ligi@ligi.de>
parent 6f88d653
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,12 @@ func FuzzMul(data []byte) int {
if remaining == 0 {
return 0
}
if remaining > 128 {
// The evm only ever uses 32 byte integers, we need to cap this otherwise
// we run into slow exec. A 236Kb byte integer cause oss-fuzz to report it as slow.
// 128 bytes should be fine though
return 0
}
buf := make([]byte, remaining)
input.Read(buf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment