crypto/bn/bn_sqrt.c:221: error: INTEGER_OVERFLOW_L2
  ([0, `p->top`] - 1):unsigned64 by call to `BN_num_bits`.
Showing all 13 steps of the trace


crypto/bn/bn_sqrt.c:62:1: Parameter `p->top`
60.   
61.   
62. > BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) 
63.   /* Returns 'ret' such that
64.    *      ret^2 == a (mod p),

crypto/bn/bn_sqrt.c:128:7: Call
126.   
127.   	/* A = a mod p */
128.   	if (!BN_nnmod(A, a, p, ctx)) goto end;
             ^
129.   
130.   	/* now write  |p| - 1  as  2^e*q  where  q  is odd */

crypto/bn/bn_mod.c:127:1: Parameter `d->top`
  125.   
  126.   
  127. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
  128.   	{
  129.   	/* like BN_mod, but returns non-negative remainder

crypto/bn/bn_mod.c:132:8: Call
  130.   	 * (i.e.,  0 <= r < |d|  always holds) */
  131.   
  132.   	if (!(BN_mod(r,m,d,ctx)))
                ^
  133.   		return 0;
  134.   	if (!r->neg)

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

crypto/bn/bn_sqrt.c:132:10: Call
130.   	/* now write  |p| - 1  as  2^e*q  where  q  is odd */
131.   	e = 1;
132.   	while (!BN_is_bit_set(p, e))
                ^
133.   		e++;
134.   	/* we'll set  q  later (if needed) */

crypto/bn/bn_lib.c:757:1: Parameter `a->top`
  755.   	}
  756.   
  757. > int BN_is_bit_set(const BIGNUM *a, int n)
  758.   	{
  759.   	int i,j;

crypto/bn/bn_sqrt.c:207:7: Call
205.   	/* e > 2, so we really have to use the Tonelli/Shanks algorithm.
206.   	 * First, find some  y  that is not a square. */
207.   	if (!BN_copy(q, p)) goto end; /* use 'q' as temp */
             ^
208.   	q->neg = 0;
209.   	i = 2;

crypto/bn/bn_lib.c:497:1: Parameter `a->dmax`
  495.   	}
  496.   
  497. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  498.   	{
  499.   	int i;

crypto/bn/bn_sqrt.c:221:27: Call
219.   		else
220.   			{
221.   			if (!BN_pseudo_rand(y, BN_num_bits(p), 0, 0)) goto end;
                                 ^
222.   			if (BN_ucmp(y, p) >= 0)
223.   				{

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, p->top] - 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.   
