#include <stdio.h>
#include <openssl/bn.h>
+#include <openssl/err.h>
#include "fuzzer.h"
+/* 256 kB */
+#define MAX_LEN (256 * 1000)
+
static BN_CTX *ctx;
static BIGNUM *b1;
static BIGNUM *b2;
b5 = BN_new();
ctx = BN_CTX_new();
+ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
+ ERR_get_state();
+
return 1;
}
/* s1 and s2 will be the signs for b1 and b2. */
int s1 = 0, s2 = 0;
+ /* limit the size of the input to avoid timeout */
+ if (len > MAX_LEN)
+ len = MAX_LEN;
+
/* We are going to split the buffer in two, sizes l1 and l2, giving b1 and
* b2.
*/
done:
OPENSSL_assert(success);
+ ERR_clear_error();
return 0;
}