aboutsummaryrefslogtreecommitdiffstats
path: root/src/extra_tests/fuzzers/jigs/redc_p521.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extra_tests/fuzzers/jigs/redc_p521.cpp')
-rw-r--r--src/extra_tests/fuzzers/jigs/redc_p521.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/extra_tests/fuzzers/jigs/redc_p521.cpp b/src/extra_tests/fuzzers/jigs/redc_p521.cpp
index fe164217d..5142a44c2 100644
--- a/src/extra_tests/fuzzers/jigs/redc_p521.cpp
+++ b/src/extra_tests/fuzzers/jigs/redc_p521.cpp
@@ -10,6 +10,9 @@
void fuzz(const uint8_t in[], size_t len)
{
+ if(len > 2*(521+7)/8)
+ return;
+
static const BigInt& prime = Botan::prime_p521();
static const BigInt prime_2 = prime * prime;
static Botan::Modular_Reducer prime_redc(prime);