crypto/dh/dh_key.c:201: error: INTEGER_OVERFLOW_L2
  ([0, `dh->p->top`] - 1):unsigned64 by call to `BN_MONT_CTX_set_locked`.
Showing all 13 steps of the trace


crypto/dh/dh_key.c:174:1: Parameter `dh->p->top`
172.   	}
173.   
174. > static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
175.   	{
176.   	BN_CTX *ctx=NULL;

crypto/dh/dh_key.c:182:6: Call
180.           int check_result;
181.   
182.   	if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS)
            ^
183.   		{
184.   		DHerr(DH_F_COMPUTE_KEY,DH_R_MODULUS_TOO_LARGE);

crypto/bn/bn_lib.c:248:1: Parameter `a->top`
  246.   	}
  247.   
  248. > int BN_num_bits(const BIGNUM *a)
  249.   	{
  250.   	int i = a->top - 1;

crypto/dh/dh_key.c:201:10: Call
199.   	if (dh->flags & DH_FLAG_CACHE_MONT_P)
200.   		{
201.   		mont = BN_MONT_CTX_set_locked(&dh->method_mont_p,
                ^
202.   				CRYPTO_LOCK_DH, dh->p, ctx);
203.   		if ((dh->flags & DH_FLAG_NO_EXP_CONSTTIME) == 0)

crypto/bn/bn_mont.c:536:1: Parameter `mod->top`
  534.   	}
  535.   
  536. > BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
  537.   					const BIGNUM *mod, BN_CTX *ctx)
  538.   	{

crypto/bn/bn_mont.c:552:16: Call
  550.   			{
  551.   			ret = BN_MONT_CTX_new();
  552.   			if (ret && !BN_MONT_CTX_set(ret, mod, ctx))
                        ^
  553.   				BN_MONT_CTX_free(ret);
  554.   			else

crypto/bn/bn_mont.c:413:1: Parameter `mod->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:421:7: Call
    419.   	if((Ri = BN_CTX_get(ctx)) == NULL) goto err;
    420.   	R= &(mont->RR);					/* grab RR as a temp */
    421.   	if (!BN_copy(&(mont->N),mod)) goto err;		/* Set N */
                 ^
    422.   	mont->N.neg = 0;
    423.   

crypto/bn/bn_lib.c:497:1: Parameter `a->dmax`
      495.   	}
      496.   
      497. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      498.   	{
      499.   	int i;

crypto/bn/bn_mont.c:434:13: Call
    432.   		tmod.neg=0;
    433.   
    434.   		mont->ri=(BN_num_bits(mod)+(BN_BITS2-1))/BN_BITS2*BN_BITS2;
                       ^
    435.   
    436.   #if defined(OPENSSL_BN_ASM_MONT) && (BN_BITS2<=32)

crypto/bn/bn_lib.c:248:1: <LHS trace>
246.   	}
247.   
248. > int BN_num_bits(const BIGNUM *a)
249.   	{
250.   	int i = a->top - 1;

crypto/bn/bn_lib.c:248:1: Parameter `a->top`
      246.   	}
      247.   
      248. > int BN_num_bits(const BIGNUM *a)
      249.   	{
      250.   	int i = a->top - 1;

crypto/bn/bn_lib.c:250:2: Binary operation: ([0, dh->p->top] - 1):unsigned64 by call to `BN_MONT_CTX_set_locked` 
      248.   int BN_num_bits(const BIGNUM *a)
      249.   	{
      250.   	int i = a->top - 1;
              ^
      251.   	bn_check_top(a);
      252.   
