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


crypto/ec/ec2_smpl.c:784:8: Call
782.   		{
783.   		if (!BN_copy(x0, &a->X)) goto err;
784.   		if (!BN_copy(y0, &a->Y)) goto err;
              ^
785.   		}
786.   	else

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

crypto/ec/ec2_smpl.c:801:6: Call
799.   
800.   
801.   	if (BN_GF2m_cmp(x0, x1))
            ^
802.   		{
803.   		if (!BN_GF2m_add(t, x0, x1)) goto err;

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 ec_GF2m_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)\n\t{\n\tBN_CTX *new_ctx = NULL;\n\tBIGNUM *x0, *y0, *x1, *y1, *x2, *y2, *s, *t;\n\tint ret = 0;\n\tif (EC_POINT_is_at_infinity(group, a))\n\t\t{\n\t\tif (!EC_POINT_copy(r, b)) return 0;\n\t\treturn 1;\n\t\t}\n\tif (EC_POINT_is_at_infinity(group, b))\n\t\t{\n\t\tif (!EC_POINT_copy(r, a)) return 0;\n\t\treturn 1;\n\t\t}\n\tif (ctx == NULL)\n\t\t{\n\t\tctx = new_ctx = BN_CTX_new();\n\t\tif (ctx == NULL)\n\t\t\treturn 0;\n\t\t}\n\tBN_CTX_start(ctx);\n\tx0 = BN_CTX_get(ctx);\n\ty0 = BN_CTX_get(ctx);\n\tx1 = BN_CTX_get(ctx);\n\ty1 = BN_CTX_get(ctx);\n\tx2 = BN_CTX_get(ctx);\n\ty2 = BN_CTX_get(ctx);\n\ts = BN_CTX_get(ctx);\n\tt = BN_CTX_get(ctx);\n\tif (t == NULL) goto err;\n\tif (a->Z_is_one)\n\t\t{\n\t\tif (!BN_copy(x0, &a->X)) goto err;\n\t\tif (!BN_copy(y0, &a->Y)) goto err;\n\t\t}\n\telse\n\t\t{\n\t\tif (!EC_POINT_get_affine_coordinates_GF2m(group, a, x0, y0, ctx)) goto err;\n\t\t}\n\tif (b->Z_is_one)\n\t\t{\n\t\tif (!BN_copy(x1, &b->X)) goto err;\n\t\tif (!BN_copy(y1, &b->Y)) goto err;\n\t\t}\n\telse\n\t\t{\n\t\tif (!EC_POINT_get_affine_coordinates_GF2m(group, b, x1, y1, ctx)) goto err;\n\t\t}\n\tif (BN_GF2m_cmp(x0, x1))\n\t\t{\n\t\tif (!BN_GF2m_add(t, x0, x1)) goto err;\n\t\tif (!BN_GF2m_add(s, y0, y1)) goto err;\n\t\tif (!group->meth->field_div(group, s, s, t, ctx)) goto err;\n\t\tif (!group->meth->field_sqr(group, x2, s, ctx)) goto err;\n\t\tif (!BN_GF2m_add(x2, x2, &group->a)) goto err;\n\t\tif (!BN_GF2m_add(x2, x2, s)) goto err;\n\t\tif (!BN_GF2m_add(x2, x2, t)) goto err;\n\t\t}\n\telse\n\t\t{\n\t\tif (BN_GF2m_cmp(y0, y1) || BN_is_zero(x1))\n\t\t\t{\n\t\t\tif (!EC_POINT_set_to_infinity(group, r)) goto err;\n\t\t\tret = 1;\n\t\t\tgoto err;\n\t\t\t}\n\t\tif (!group->meth->field_div(group, s, y1, x1, ctx)) goto err;\n\t\tif (!BN_GF2m_add(s, s, x1)) goto err;\n\t\tif (!group->meth->field_sqr(group, x2, s, ctx)) goto err;\n\t\tif (!BN_GF2m_add(x2, x2, s)) goto err;\n\t\tif (!BN_GF2m_add(x2, x2, &group->a)) goto err;\n\t\t}\n\tif (!BN_GF2m_add(y2, x1, x2)) goto err;\n\tif (!group->meth->field_mul(group, y2, y2, s, ctx)) goto err;\n\tif (!BN_GF2m_add(y2, y2, x2)) goto err;\n\tif (!BN_GF2m_add(y2, y2, y1)) goto err;\n\tif (!EC_POINT_set_affine_coordinates_GF2m(group, r, x2, y2, ctx)) goto err;\n\tret = 1;\n err:\n\tBN_CTX_end(ctx);\n\tif (new_ctx != NULL)\n\t\tBN_CTX_free(new_ctx);\n\treturn ret;\n\t}', 'BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)\n\t{\n\tint i;\n\tBN_ULONG *A;\n\tconst BN_ULONG *B;\n\tbn_check_top(b);\n\tif (a == b) return(a);\n\tif (bn_wexpand(a,b->top) == NULL) return(NULL);\n#if 1\n\tA=a->d;\n\tB=b->d;\n\tfor (i=b->top>>2; i>0; i--,A+=4,B+=4)\n\t\t{\n\t\tBN_ULONG a0,a1,a2,a3;\n\t\ta0=B[0]; a1=B[1]; a2=B[2]; a3=B[3];\n\t\tA[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3;\n\t\t}\n\tswitch (b->top&3)\n\t\t{\n\t\tcase 3: A[2]=B[2];\n\t\tcase 2: A[1]=B[1];\n\t\tcase 1: A[0]=B[0];\n\t\tcase 0: ;\n\t\t}\n#else\n\tmemcpy(a->d,b->d,sizeof(b->d[0])*b->top);\n#endif\n\ta->top=b->top;\n\ta->neg=b->neg;\n\tbn_check_top(a);\n\treturn(a);\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}']