apps/dhparam.c:322: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `DSA_dup_DH`.
Showing all 10 steps of the trace


apps/dhparam.c:314:16: Call
312.   			
313.   			BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num);
314.   			if(!dsa || !DSA_generate_parameters_ex(dsa, num,
                      ^
315.   						NULL, 0, NULL, NULL, &cb))
316.   				{

crypto/dsa/dsa_gen.c:107:10: Call
  105.   			}
  106.   
  107.   		return dsa_builtin_paramgen(ret, bits, qbits, evpmd,
                  ^
  108.   				seed_in, seed_len, counter_ret, h_ret, cb);
  109.   		}

crypto/dsa/dsa_gen.c:275:9: Call
    273.   			/* step 9 */
    274.   			if (!BN_lshift1(r0,q)) goto err;
    275.   			if (!BN_mod(c,X,r0,ctx)) goto err;
                   ^
    276.   			if (!BN_sub(r0,c,BN_value_one())) goto err;
    277.   			if (!BN_sub(p,X,r0)) goto err;

crypto/bn/bn_div.c:181:1: Parameter `dv->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.   	{

apps/dhparam.c:322:9: Call
320.   				}
321.   
322.   			dh = DSA_dup_DH(dsa);
               ^
323.   			DSA_free(dsa);
324.   			if (dh == NULL)

crypto/dsa/dsa_lib.c:276:1: Parameter `r->q->top`
  274.   
  275.   #ifndef OPENSSL_NO_DH
  276. > DH *DSA_dup_DH(const DSA *r)
  277.   	{
  278.   	/* DSA has p, q, g, optional pub_key, optional priv_key.

crypto/dsa/dsa_lib.c:293:17: Call
  291.   			goto err;
  292.   	if (r->q != NULL)
  293.   		ret->length = BN_num_bits(r->q);
                         ^
  294.   	if (r->g != NULL)
  295.   		if ((ret->g = BN_dup(r->g)) == NULL)

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, +oo] - 1):unsigned64 by call to `DSA_dup_DH` 
    248.   int BN_num_bits(const BIGNUM *a)
    249.   	{
    250.   	int i = a->top - 1;
            ^
    251.   	bn_check_top(a);
    252.   
