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


crypto/bn/bn_mod.c:152:7: Call
150.   int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
151.   	{
152.   	if (!BN_uadd(r, a, b)) return 0;
             ^
153.   	if (BN_ucmp(r, m) >= 0)
154.   		return BN_usub(r, r, m);

crypto/bn/bn_add.c:105:1: Parameter `r->top`
  103.   
  104.   /* unsigned add of b to a */
  105. > int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
  106.   	{
  107.   	size_t max,min,dif;

crypto/bn/bn_mod.c:153:6: Call
151.   	{
152.   	if (!BN_uadd(r, a, b)) return 0;
153.   	if (BN_ucmp(r, m) >= 0)
            ^
154.   		return BN_usub(r, r, m);
155.   	return 1;

crypto/bn/bn_lib.c:656:1: <LHS trace>
654.   	}
655.   
656. > int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
657.   	{
658.   	int i;

crypto/bn/bn_lib.c:656:1: Parameter `a->top`
  654.   	}
  655.   
  656. > int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
  657.   	{
  658.   	int i;

crypto/bn/bn_lib.c:668:7: Binary operation: ([0, +oo] - 1):unsigned64 by call to `BN_ucmp` 
  666.   	ap=a->d;
  667.   	bp=b->d;
  668.   	for (i=a->top-1; i>=0; i--)
               ^
  669.   		{
  670.   		t1= ap[i];

int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
	{
	int i;
	BN_ULONG t1,t2,*ap,*bp;
	bn_check_top(a);
	bn_check_top(b);
	i=a->top-b->top;
	if (i != 0) return(i);
	ap=a->d;
	bp=b->d;
	for (i=a->top-1; i>=0; i--)
		{
		t1= ap[i];
		t2= bp[i];
		if (t1 != t2)
			return((t1 > t2) ? 1 : -1);
		}
	return(0);
	}
['int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)\n\t{\n\tif (!BN_uadd(r, a, b)) return 0;\n\tif (BN_ucmp(r, m) >= 0)\n\t\treturn BN_usub(r, r, m);\n\treturn 1;\n\t}', 'int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)\n\t{\n\tsize_t max,min,dif;\n\tBN_ULONG *ap,*bp,*rp,carry,t1,t2;\n\tconst BIGNUM *tmp;\n\tbn_check_top(a);\n\tbn_check_top(b);\n\tif (a->top < b->top)\n\t\t{ tmp=a; a=b; b=tmp; }\n\tmax = a->top;\n\tmin = b->top;\n\tdif = max - min;\n\tif (bn_wexpand(r,max+1) == NULL)\n\t\treturn 0;\n\tr->top=max;\n\tap=a->d;\n\tbp=b->d;\n\trp=r->d;\n\tcarry=bn_add_words(rp,ap,bp,min);\n\trp+=min;\n\tap+=min;\n\tbp+=min;\n\tif (carry)\n\t\t{\n\t\twhile (dif)\n\t\t\t{\n\t\t\tdif--;\n\t\t\tt1 = *(ap++);\n\t\t\tt2 = (t1+1) & BN_MASK2;\n\t\t\t*(rp++) = t2;\n\t\t\tif (t2)\n\t\t\t\t{\n\t\t\t\tcarry=0;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tif (carry)\n\t\t\t{\n\t\t\t*rp = 1;\n\t\t\tr->top++;\n\t\t\t}\n\t\t}\n\tif (dif && rp != ap)\n\t\twhile (dif--)\n\t\t\t*(rp++) = *(ap++);\n\tr->neg = 0;\n\tbn_check_top(r);\n\treturn 1;\n\t}', 'int BN_ucmp(const BIGNUM *a, const BIGNUM *b)\n\t{\n\tint i;\n\tBN_ULONG t1,t2,*ap,*bp;\n\tbn_check_top(a);\n\tbn_check_top(b);\n\ti=a->top-b->top;\n\tif (i != 0) return(i);\n\tap=a->d;\n\tbp=b->d;\n\tfor (i=a->top-1; i>=0; i--)\n\t\t{\n\t\tt1= ap[i];\n\t\tt2= bp[i];\n\t\tif (t1 != t2)\n\t\t\treturn((t1 > t2) ? 1 : -1);\n\t\t}\n\treturn(0);\n\t}']