crypto/bn/bn_mpi.c:125: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `BN_num_bits`.
Showing all 6 steps of the trace


crypto/bn/bn_mpi.c:120:6: Call
118.   	if ((*d) & 0x80)
119.   		neg=1;
120.   	if (BN_bin2bn(d,(int)len,a) == NULL)
            ^
121.   		return(NULL);
122.   	a->neg=neg;

crypto/bn/bn_lib.c:597:1: Parameter `ret->top`
  595.   	}
  596.   
  597. > BIGNUM *BN_bin2bn(const unsigned char *s, size_t len, BIGNUM *ret)
  598.   	{
  599.   	unsigned int i,m;

crypto/bn/bn_mpi.c:125:18: Call
123.   	if (neg)
124.   		{
125.   		BN_clear_bit(a,BN_num_bits(a)-1);
                        ^
126.   		}
127.   	bn_check_top(a);

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

int BN_num_bits(const BIGNUM *a)
	{
	int i = a->top - 1;
	bn_check_top(a);
	if (BN_is_zero(a)) return 0;
	return ((i*BN_BITS2) + BN_num_bits_word(a->d[i]));
	}
['BIGNUM *BN_mpi2bn(const unsigned char *d, size_t n, BIGNUM *a)\n\t{\n\tlong len;\n\tint neg=0;\n\tif (n < 4)\n\t\t{\n\t\tBNerr(BN_F_BN_MPI2BN,BN_R_INVALID_LENGTH);\n\t\treturn(NULL);\n\t\t}\n\tlen=((long)d[0]<<24)|((long)d[1]<<16)|((int)d[2]<<8)|(int)d[3];\n\tif ((len+4) != n)\n\t\t{\n\t\tBNerr(BN_F_BN_MPI2BN,BN_R_ENCODING_ERROR);\n\t\treturn(NULL);\n\t\t}\n\tif (a == NULL) a=BN_new();\n\tif (a == NULL) return(NULL);\n\tif (len == 0)\n\t\t{\n\t\ta->neg=0;\n\t\ta->top=0;\n\t\treturn(a);\n\t\t}\n\td+=4;\n\tif ((*d) & 0x80)\n\t\tneg=1;\n\tif (BN_bin2bn(d,(int)len,a) == NULL)\n\t\treturn(NULL);\n\ta->neg=neg;\n\tif (neg)\n\t\t{\n\t\tBN_clear_bit(a,BN_num_bits(a)-1);\n\t\t}\n\tbn_check_top(a);\n\treturn(a);\n\t}', 'BIGNUM *BN_bin2bn(const unsigned char *s, size_t len, BIGNUM *ret)\n\t{\n\tunsigned int i,m;\n\tunsigned int n;\n\tBN_ULONG l;\n\tBIGNUM  *bn = NULL;\n\tif (ret == NULL)\n\t\tret = bn = BN_new();\n\tif (ret == NULL) return(NULL);\n\tbn_check_top(ret);\n\tl=0;\n\tn=len;\n\tif (n == 0)\n\t\t{\n\t\tret->top=0;\n\t\treturn(ret);\n\t\t}\n\ti=((n-1)/BN_BYTES)+1;\n\tm=((n-1)%(BN_BYTES));\n\tif (bn_wexpand(ret, i) == NULL)\n\t\t{\n\t\tif (bn) BN_free(bn);\n\t\treturn NULL;\n\t\t}\n\tret->top=i;\n\tret->neg=0;\n\twhile (n--)\n\t\t{\n\t\tl=(l<<8L)| *(s++);\n\t\tif (m-- == 0)\n\t\t\t{\n\t\t\tret->d[--i]=l;\n\t\t\tl=0;\n\t\t\tm=BN_BYTES-1;\n\t\t\t}\n\t\t}\n\tbn_correct_top(ret);\n\treturn(ret);\n\t}', 'int BN_num_bits(const BIGNUM *a)\n\t{\n\tint i = a->top - 1;\n\tbn_check_top(a);\n\tif (BN_is_zero(a)) return 0;\n\treturn ((i*BN_BITS2) + BN_num_bits_word(a->d[i]));\n\t}']