crypto/bn/bn_mont.c:515: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `BN_div`.
Showing all 19 steps of the trace


crypto/bn/bn_mont.c:413:1: Parameter `mont->RR.top`
411.   	}
412.   
413. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
414.   	{
415.   	int ret = 0;

crypto/bn/bn_mont.c:472:3: Call
470.   		mont->n0[1] = (Ri->top > 1) ? Ri->d[1] : 0;
471.   #else
472.   		BN_zero(R);
         ^
473.   		if (!(BN_set_bit(R,BN_BITS2))) goto err;	/* R */
474.   

crypto/bn/bn_lib.c:586:1: Parameter `a->top`
  584.   	}
  585.   
  586. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  587.   	{
  588.   	bn_check_top(a);

crypto/bn/bn_mont.c:473:9: Call
471.   #else
472.   		BN_zero(R);
473.   		if (!(BN_set_bit(R,BN_BITS2))) goto err;	/* R */
               ^
474.   
475.   		buf[0]=mod->d[0]; /* tmod = N mod word size */

crypto/bn/bn_lib.c:719:1: Parameter `a->top`
  717.   	}
  718.   
  719. > int BN_set_bit(BIGNUM *a, int n)
  720.   	{
  721.   	size_t i,j,k;

crypto/bn/bn_mont.c:479:8: Call
477.   		tmod.top = buf[0] != 0 ? 1 : 0;
478.   							/* Ri = R^-1 mod N*/
479.   		if ((BN_mod_inverse(Ri,R,&tmod,ctx)) == NULL)
              ^
480.   			goto err;
481.   		if (!BN_lshift(Ri,Ri,BN_BITS2)) goto err; /* R*Ri */

crypto/bn/bn_gcd.c:208:1: Parameter `a->top`
  206.   static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
  207.           const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
  208. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  209.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  210.   	{

crypto/bn/bn_mont.c:513:2: Call
511.   
512.   	/* setup RR for conversions */
513.   	BN_zero(&(mont->RR));
        ^
514.   	if (!BN_set_bit(&(mont->RR),mont->ri*2)) goto err;
515.   	if (!BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx)) goto err;

crypto/bn/bn_lib.c:586:1: Parameter `a->top`
  584.   	}
  585.   
  586. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  587.   	{
  588.   	bn_check_top(a);

crypto/bn/bn_mont.c:514:7: Call
512.   	/* setup RR for conversions */
513.   	BN_zero(&(mont->RR));
514.   	if (!BN_set_bit(&(mont->RR),mont->ri*2)) goto err;
             ^
515.   	if (!BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx)) goto err;
516.   

crypto/bn/bn_lib.c:719:1: Parameter `a->top`
  717.   	}
  718.   
  719. > int BN_set_bit(BIGNUM *a, int n)
  720.   	{
  721.   	size_t i,j,k;

crypto/bn/bn_mont.c:515:7: Call
513.   	BN_zero(&(mont->RR));
514.   	if (!BN_set_bit(&(mont->RR),mont->ri*2)) goto err;
515.   	if (!BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx)) goto err;
             ^
516.   
517.   	ret = 1;

crypto/bn/bn_div.c:181:1: Parameter `num->top`
  179.   static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
  180.           const BIGNUM *divisor, BN_CTX *ctx);
  181. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  182.   	   BN_CTX *ctx)
  183.   	{

crypto/bn/bn_div.c:204:10: Call
  202.   	if ((BN_get_flags(num, BN_FLG_CONSTTIME) != 0) || (BN_get_flags(divisor, BN_FLG_CONSTTIME) != 0))
  203.   		{
  204.   		return BN_div_no_branch(dv, rm, num, divisor, ctx);
                  ^
  205.   		}
  206.   

crypto/bn/bn_div.c:426:1: Parameter `num->top`
    424.    * branches that may leak sensitive information.
    425.    */
    426. > static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, 
    427.   	const BIGNUM *divisor, BN_CTX *ctx)
    428.   	{

crypto/bn/bn_div.c:460:8: Call
    458.   	sdiv->neg=0;
    459.   	norm_shift+=BN_BITS2;
    460.   	if (!(BN_lshift(snum,num,norm_shift))) goto err;
                  ^
    461.   	snum->neg=0;
    462.   

crypto/bn/bn_shift.c:132:1: <LHS trace>
130.   	}
131.   
132. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
133.   	{
134.   	int i,nw,lb,rb;

crypto/bn/bn_shift.c:132:1: Parameter `a->top`
      130.   	}
      131.   
      132. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      133.   	{
      134.   	int i,nw,lb,rb;

crypto/bn/bn_shift.c:150:8: Binary operation: ([0, +oo] - 1):unsigned64 by call to `BN_div` 
      148.   	t[a->top+nw]=0;
      149.   	if (lb == 0)
      150.   		for (i=a->top-1; i>=0; i--)
                    ^
      151.   			t[nw+i]=f[i];
      152.   	else
