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


crypto/bn/bn_mod.c:256:1: Parameter `m->top`
254.   /* BN_mod_lshift variant that may be used if  a  is non-negative
255.    * and less than  m */
256. > int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m)
257.   	{
258.   	if (r != a)

crypto/bn/bn_mod.c:268:15: Call
266.   		
267.   		/* 0 < r < m */
268.   		max_shift = BN_num_bits(m) - BN_num_bits(r);
                     ^
269.   		/* max_shift >= 0 */
270.   

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]));
	}
['int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m)\n\t{\n\tif (r != a)\n\t\t{\n\t\tif (BN_copy(r, a) == NULL) return 0;\n\t\t}\n\twhile (n > 0)\n\t\t{\n\t\tint max_shift;\n\t\tmax_shift = BN_num_bits(m) - BN_num_bits(r);\n\t\tif (max_shift < 0)\n\t\t\t{\n\t\t\tBNerr(BN_F_BN_MOD_LSHIFT_QUICK, BN_R_INPUT_NOT_REDUCED);\n\t\t\treturn 0;\n\t\t\t}\n\t\tif (max_shift > n)\n\t\t\tmax_shift = n;\n\t\tif (max_shift)\n\t\t\t{\n\t\t\tif (!BN_lshift(r, r, max_shift)) return 0;\n\t\t\tn -= max_shift;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tif (!BN_lshift1(r, r)) return 0;\n\t\t\t--n;\n\t\t\t}\n\t\tif (BN_cmp(r, m) >= 0)\n\t\t\t{\n\t\t\tif (!BN_sub(r, r, m)) return 0;\n\t\t\t}\n\t\t}\n\tbn_check_top(r);\n\treturn 1;\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}']