Coverage Report

Created: 2020-11-21 08:34

/src/botan/src/fuzzer/bn_sqr.cpp
Line
Count
Source
1
/*
2
* (C) 2015,2016 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6
7
#include "fuzzers.h"
8
9
#include <botan/bigint.h>
10
#include <botan/numthry.h>
11
12
void fuzz(const uint8_t in[], size_t len)
13
222
   {
14
222
   if(len > 8192/8)
15
17
      return;
16
17
205
   Botan::BigInt x = Botan::BigInt::decode(in, len);
18
19
205
   Botan::BigInt x_sqr = square(x);
20
205
   Botan::BigInt x_mul = x * x;
21
22
205
   FUZZER_ASSERT_EQUAL(x_sqr, x_mul);
23
205
   }
24