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


apps/apps.c:1709:7: Call
1707.   		return 0;
1708.   
1709.   	if (!BN_pseudo_rand(btmp, SERIAL_RAND_BITS, 0, 0))
              ^
1710.   		goto error;
1711.   	if (ai && !BN_to_ASN1_INTEGER(btmp, ai))

crypto/bn/bn_rand.c:218:9: Call
  216.   int     BN_pseudo_rand(BIGNUM *rnd, size_t bits, int top, int bottom)
  217.   	{
  218.   	return bnrand(1, rnd, bits, top, bottom);
                 ^
  219.   	}
  220.   

crypto/bn/bn_rand.c:118:1: Parameter `rnd->top`
    116.   #include <openssl/rand.h>
    117.   
    118. > static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    119.   	{
    120.   	unsigned char *buf=NULL;

apps/apps.c:1711:13: Call
1709.   	if (!BN_pseudo_rand(btmp, SERIAL_RAND_BITS, 0, 0))
1710.   		goto error;
1711.   	if (ai && !BN_to_ASN1_INTEGER(btmp, ai))
                    ^
1712.   		goto error;
1713.   

crypto/asn1/a_int.c:405:1: Parameter `bn->top`
  403.   	}
  404.   
  405. > ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai)
  406.   	{
  407.   	ASN1_INTEGER *ret;

crypto/asn1/a_int.c:422:4: Call
  420.   		ret->type = V_ASN1_NEG_INTEGER;
  421.   	else ret->type=V_ASN1_INTEGER;
  422.   	j=BN_num_bits(bn);
            ^
  423.   	len=((j == 0)?0:((j/8)+1));
  424.   	if (ret->length < len+4)

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