crypto/bn/bn_mont.c:419: error: BUFFER_OVERRUN_L3
  Offset: [-1, 0] Size: 2 by call to `BN_mod_inverse`.
Showing all 13 steps of the trace


crypto/bn/bn_mont.c:353:1: Array declaration
351.   	}
352.   
353. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
354.   	{
355.   	int ret = 0;

crypto/bn/bn_mont.c:370:3: Assignment
368.   
369.   		BN_init(&tmod);
370.   		tmod.d=buf;
         ^
371.   		tmod.dmax=2;
372.   		tmod.neg=0;

crypto/bn/bn_mont.c:419:8: Call
417.   		tmod.top = buf[0] != 0 ? 1 : 0;
418.   							/* Ri = R^-1 mod N*/
419.   		if ((BN_mod_inverse(Ri,R,&tmod,ctx)) == NULL)
              ^
420.   			goto err;
421.   		if (!BN_lshift(Ri,Ri,BN_BITS2)) goto err; /* R*Ri */

crypto/bn/bn_gcd.c:211:1: Parameter `*n->d`
  209.           const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
  210.   
  211. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  212.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  213.   	{

crypto/bn/bn_gcd.c:216:7: Call
  214.   	BIGNUM *rv;
  215.   	int noinv;
  216.   	rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
               ^
  217.   	if (noinv)
  218.   		BNerr(BN_F_BN_MOD_INVERSE,BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:222:1: Parameter `*n->d`
    220.   	}
    221.   
    222. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    223.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx, int *pnoinv)
    224.   	{

crypto/bn/bn_gcd.c:273:23: Call
    271.   	 */
    272.   
    273.   	if (BN_is_odd(n) && (BN_num_bits(n) <= (BN_BITS <= 32 ? 450 : 2048)))
                                 ^
    274.   		{
    275.   		/* Binary inversion algorithm; requires odd modulus.

crypto/bn/bn_lib.c:230:1: <Offset trace>
228.   	}
229.   
230. > int BN_num_bits(const BIGNUM *a)
231.   	{
232.   	int i = a->top - 1;

crypto/bn/bn_lib.c:230:1: Parameter `a->top`
      228.   	}
      229.   
      230. > int BN_num_bits(const BIGNUM *a)
      231.   	{
      232.   	int i = a->top - 1;

crypto/bn/bn_lib.c:232:2: Assignment
      230.   int BN_num_bits(const BIGNUM *a)
      231.   	{
      232.   	int i = a->top - 1;
              ^
      233.   	bn_check_top(a);
      234.   

crypto/bn/bn_lib.c:230:1: <Length trace>
228.   	}
229.   
230. > int BN_num_bits(const BIGNUM *a)
231.   	{
232.   	int i = a->top - 1;

crypto/bn/bn_lib.c:230:1: Parameter `*a->d`
      228.   	}
      229.   
      230. > int BN_num_bits(const BIGNUM *a)
      231.   	{
      232.   	int i = a->top - 1;

crypto/bn/bn_lib.c:236:42: Array access: Offset: [-1, 0] Size: 2 by call to `BN_mod_inverse` 
      234.   
      235.   	if (BN_is_zero(a)) return 0;
      236.   	return ((i*BN_BITS2) + BN_num_bits_word(a->d[i]));
                                                      ^
      237.   	}
      238.   
