diff options
author | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-08-21 07:16:17 +0200 |
---|---|---|
committer | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-08-21 07:16:17 +0200 |
commit | 23d31796efb88463080404bad96ea78ea1a25020 (patch) | |
tree | 0e36e7c7d3b922ab4edee18057961c7c3737f7cf /fuzz/mpi_expmod_target.cc | |
parent | 42927a6dcfb8fdc49db07f7c6ccef9d203d0f9d5 (diff) | |
download | nss-hg-23d31796efb88463080404bad96ea78ea1a25020.tar.gz |
Bug 1334106 - improve mpi fuzzing, r=bustage
Diffstat (limited to 'fuzz/mpi_expmod_target.cc')
-rw-r--r-- | fuzz/mpi_expmod_target.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fuzz/mpi_expmod_target.cc b/fuzz/mpi_expmod_target.cc index d1ce7e6b2..23826e935 100644 --- a/fuzz/mpi_expmod_target.cc +++ b/fuzz/mpi_expmod_target.cc @@ -19,12 +19,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { auto modulus = get_modulus(data, size, ctx); // Compare with OpenSSL exp mod m1 = &std::get<1>(modulus); - check_equal(A, &a, max_size); - check_equal(B, &b, max_size); - check_equal(std::get<0>(modulus), m1, max_size); print_bn("A", A); print_bn("B", B); print_bn("m", std::get<0>(modulus)); + check_equal(A, &a, max_size); + check_equal(B, &b, max_size); + check_equal(std::get<0>(modulus), m1, 3 * max_size); assert(mp_exptmod(&a, &b, m1, &c) == MP_OKAY); (void)BN_mod_exp(C, A, B, std::get<0>(modulus), ctx); check_equal(C, &c, 2 * max_size); |