crypto/bn/bn_nist.c:750: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - [0, max(4294967295, `*a->d`)]):unsigned64 by call to `bn_sub_words`.
Showing all 9 steps of the trace


crypto/bn/bn_nist.c:711:2: Assignment
709.   
710.   	/*S1*/
711.   	BN_256_SET(t_d,0,0,0,0,0,23,22,21)
        ^
712.   		/* left shift */
713.   		{

crypto/bn/bn_nist.c:750:6: Call
748.   	/*D1*/
749.   	BN_384_SET(t_d,22,21,20,19,18,17,16,15,14,13,12,23)
750.   	if (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))
            ^
751.   		--carry;
752.   	/*D2*/

crypto/bn/bn_asm.c:385:1: <LHS trace>
383.   #endif /* !BN_LLONG */
384.   
385. > BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
386.           {
387.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:385:1: Parameter `*a`
  383.   #endif /* !BN_LLONG */
  384.   
  385. > BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
  386.           {
  387.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:395:3: Assignment
  393.   	for (;;)
  394.   		{
  395.   		t1=a[0]; t2=b[0];
           ^
  396.   		r[0]=(t1-t2-c)&BN_MASK2;
  397.   		if (t1 != t2) c=(t1 < t2);

crypto/bn/bn_asm.c:385:1: <RHS trace>
383.   #endif /* !BN_LLONG */
384.   
385. > BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
386.           {
387.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:385:1: Parameter `*b`
  383.   #endif /* !BN_LLONG */
  384.   
  385. > BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
  386.           {
  387.   	BN_ULONG t1,t2;

crypto/bn/bn_asm.c:395:12: Assignment
  393.   	for (;;)
  394.   		{
  395.   		t1=a[0]; t2=b[0];
                    ^
  396.   		r[0]=(t1-t2-c)&BN_MASK2;
  397.   		if (t1 != t2) c=(t1 < t2);

crypto/bn/bn_asm.c:396:3: Binary operation: ([0, +oo] - [0, max(4294967295, *a->d)]):unsigned64 by call to `bn_sub_words` 
  394.   		{
  395.   		t1=a[0]; t2=b[0];
  396.   		r[0]=(t1-t2-c)&BN_MASK2;
           ^
  397.   		if (t1 != t2) c=(t1 < t2);
  398.   		if (--n <= 0) break;

BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)
        {
	BN_ULONG t1,t2;
	int c=0;
	assert(n >= 0);
	if (n <= 0) return((BN_ULONG)0);
	for (;;)
		{
		t1=a[0]; t2=b[0];
		r[0]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[1]; t2=b[1];
		r[1]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[2]; t2=b[2];
		r[2]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		t1=a[3]; t2=b[3];
		r[3]=(t1-t2-c)&BN_MASK2;
		if (t1 != t2) c=(t1 < t2);
		if (--n <= 0) break;
		a+=4;
		b+=4;
		r+=4;
		}
	return(c);
	}
['int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,\n\tBN_CTX *ctx)\n\t{\n#ifndef NO_32_BIT_TYPE\n\tint\ttmp_int;\n\tint\tcarry = 0;\n\tregister BN_ULONG *r_d, *a_d;\n\tBN_ULONG t_d[BN_NIST_384_TOP];\n\tBN_32_BIT_BUF(12) BN_32_BIT_BUF(13)\n\tBN_32_BIT_BUF(14) BN_32_BIT_BUF(15)\n\tBN_32_BIT_BUF(16) BN_32_BIT_BUF(17)\n\tBN_32_BIT_BUF(18) BN_32_BIT_BUF(19)\n\tBN_32_BIT_BUF(20) BN_32_BIT_BUF(21)\n\tBN_32_BIT_BUF(22) BN_32_BIT_BUF(23)\n\tif (!_is_set_384_data)\n\t\t{\n\t\tCRYPTO_w_lock(CRYPTO_LOCK_BN);\n\t\tif (!_is_set_384_data)\n\t\t\t_init_384_data();\n\t\tCRYPTO_w_unlock(CRYPTO_LOCK_BN);\n\t\t}\n\ttmp_int = BN_ucmp(field, a);\n\tif (tmp_int == 0)\n\t\treturn BN_zero(r);\n\telse if (tmp_int > 0)\n\t\treturn (r == a)? 1 : (BN_copy(r ,a) != NULL);\n\tif (r != a)\n\t\tif (!BN_ncopy(r, a, BN_NIST_384_TOP))\n\t\t\treturn 0;\n\tr_d = r->d;\n\ta_d = a->d;\n\ttmp_int = a->top-1;\n\tswitch (tmp_int)\n\t\t{\n\t\tBN_CASE_32_BIT(23, a_d)\n\t\tBN_CASE_32_BIT(22, a_d)\n\t\tBN_CASE_32_BIT(21, a_d)\n\t\tBN_CASE_32_BIT(20, a_d)\n\t\tBN_CASE_32_BIT(19, a_d)\n\t\tBN_CASE_32_BIT(18, a_d)\n\t\tBN_CASE_32_BIT(17, a_d)\n\t\tBN_CASE_32_BIT(16, a_d)\n\t\tBN_CASE_32_BIT(15, a_d)\n\t\tBN_CASE_32_BIT(14, a_d)\n\t\tBN_CASE_32_BIT(13, a_d)\n\t\tBN_CASE_32_BIT(12, a_d)\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn BN_usub(r, a, field);\n\t\t}\n\tBN_256_SET(t_d,0,0,0,0,0,23,22,21)\n\t\t{\n\t\tregister BN_ULONG *ap,t,c;\n\t\tap = t_d;\n\t\tc=0;\n\t\tfor (tmp_int=BN_NIST_256_TOP; tmp_int != 0; --tmp_int)\n\t\t\t{\n\t\t\tt= *ap;\n\t\t\t*(ap++)=((t<<1)|c)&BN_MASK2;\n\t\t\tc=(t & BN_TBIT)?1:0;\n\t\t\t}\n\t\t}\n\tif (bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2),\n\t\tt_d, BN_NIST_256_TOP))\n\t\t++carry;\n\tBN_384_SET(t_d,23,22,21,20,19,18,17,16,15,14,13,12)\n\tif (bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t++carry;\n\tBN_384_SET(t_d,20,19,18,17,16,15,14,13,12,23,22,21)\n\tif (bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t++carry;\n\tBN_384_SET(t_d,19,18,17,16,15,14,13,12,20,0,23,0)\n\tif (bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t++carry;\n\tBN_256_SET(t_d,0,0,0,0,23,22,21,20)\n\tif (bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2),\n\t\tt_d, BN_NIST_256_TOP))\n\t\t++carry;\n\tBN_384_SET(t_d,0,0,0,0,0,0,23,22,21,0,0,20)\n\tif (bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t++carry;\n\tBN_384_SET(t_d,22,21,20,19,18,17,16,15,14,13,12,23)\n\tif (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t--carry;\n\tBN_384_SET(t_d,0,0,0,0,0,0,0,23,22,21,20,0)\n\tif (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t--carry;\n\tBN_384_SET(t_d,0,0,0,0,0,0,0,23,23,0,0,0)\n\tif (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))\n\t\t--carry;\n\tif (carry)\n\t\t{\n\t\tif (carry > 0)\n\t\t\tbn_sub_words(r_d, r_d, _384_data + BN_NIST_384_TOP *\n\t\t\t\t--carry, BN_NIST_384_TOP);\n\t\telse\n\t\t\t{\n\t\t\tcarry = -carry;\n\t\t\tbn_add_words(r_d, r_d, _384_data + BN_NIST_384_TOP *\n\t\t\t\t--carry, BN_NIST_384_TOP);\n\t\t\t}\n\t\t}\n\tr->top = BN_NIST_384_TOP;\n#if 1\n\tbn_clear_top2max(r);\n#endif\n\tbn_fix_top(r);\n\tif (BN_ucmp(r, field) >= 0)\n\t\t{\n\t\tbn_sub_words(r_d, r_d, _nist_p_384, BN_NIST_384_TOP);\n\t\tbn_fix_top(r);\n\t\t}\n\treturn 1;\n#else\n\treturn 0;\n#endif\n\t}', 'BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n)\n        {\n\tBN_ULONG t1,t2;\n\tint c=0;\n\tassert(n >= 0);\n\tif (n <= 0) return((BN_ULONG)0);\n\tfor (;;)\n\t\t{\n\t\tt1=a[0]; t2=b[0];\n\t\tr[0]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[1]; t2=b[1];\n\t\tr[1]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[2]; t2=b[2];\n\t\tr[2]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\tt1=a[3]; t2=b[3];\n\t\tr[3]=(t1-t2-c)&BN_MASK2;\n\t\tif (t1 != t2) c=(t1 < t2);\n\t\tif (--n <= 0) break;\n\t\ta+=4;\n\t\tb+=4;\n\t\tr+=4;\n\t\t}\n\treturn(c);\n\t}']