apps/prime.c:134: error: INTEGER_OVERFLOW_L1
  (0 - 1):unsigned64 by call to `BN_bn2dec`.
Showing all 10 steps of the trace


apps/prime.c:132:5: Call
130.   	    return 1;
131.   	    }
132.   	bn=BN_new();
           ^
133.   	BN_generate_prime_ex(bn,bits,safe,NULL,NULL,NULL);
134.   	s=hex ? BN_bn2hex(bn) : BN_bn2dec(bn);

crypto/bn/bn_lib.c:308:2: Assignment
  306.   		}
  307.   	ret->flags=BN_FLG_MALLOCED;
  308.   	ret->top=0;
          ^
  309.   	ret->neg=0;
  310.   	ret->dmax=0;

apps/prime.c:133:2: Call
131.   	    }
132.   	bn=BN_new();
133.   	BN_generate_prime_ex(bn,bits,safe,NULL,NULL,NULL);
        ^
134.   	s=hex ? BN_bn2hex(bn) : BN_bn2dec(bn);
135.   	BIO_printf(bio_out,"%s\n",s);

crypto/bn/bn_prime.c:159:1: Parameter `add->top`
  157.   	}
  158.   
  159. > int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
  160.   	const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
  161.   	{

apps/prime.c:134:26: Call
132.   	bn=BN_new();
133.   	BN_generate_prime_ex(bn,bits,safe,NULL,NULL,NULL);
134.   	s=hex ? BN_bn2hex(bn) : BN_bn2dec(bn);
                                ^
135.   	BIO_printf(bio_out,"%s\n",s);
136.   	OPENSSL_free(s);

crypto/bn/bn_print.c:103:1: Parameter `a->top`
  101.   
  102.   /* Must 'OPENSSL_free' the returned data */
  103. > char *BN_bn2dec(const BIGNUM *a)
  104.   	{
  105.   	int i=0,num, ok = 0;

crypto/bn/bn_print.c:116:4: Call
  114.   	 *     <= BN_num_bits(a)/10 + BN_num_bits/1000 + 1 + 1 
  115.   	 */
  116.   	i=BN_num_bits(a)*3;
            ^
  117.   	num=(i/10+i/1000+1)+1;
  118.   	bn_data=(BN_ULONG *)OPENSSL_malloc((num/BN_DEC_NUM+1)*sizeof(BN_ULONG));

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