diff options
Diffstat (limited to 'src/extra_tests/fuzzers/jigs/ressol.cpp')
-rw-r--r-- | src/extra_tests/fuzzers/jigs/ressol.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/extra_tests/fuzzers/jigs/ressol.cpp b/src/extra_tests/fuzzers/jigs/ressol.cpp index 4c3f8df69..3f7f82502 100644 --- a/src/extra_tests/fuzzers/jigs/ressol.cpp +++ b/src/extra_tests/fuzzers/jigs/ressol.cpp @@ -9,7 +9,12 @@ void fuzz(const uint8_t in[], size_t len) { - if(len % 2 != 0) + /* + * This allows two values (a,p) up to 768 bits in length, which is + * sufficient to test ressol (modular square root) for since it is + * mostly used for ECC. + */ + if(len % 2 != 0 || len > 2 * (768 / 8)) return; const BigInt a = BigInt::decode(in, len / 2); |