crypto/bn/bn_print.c:135: error: INTEGER_OVERFLOW_L2
  ([1, 4294967295] - [1, 1000000000]):unsigned64 by call to `BN_div_word`.
Showing all 8 steps of the trace


crypto/bn/bn_print.c:135:8: Call
133.   		while (!BN_is_zero(t))
134.   			{
135.   			*lp=BN_div_word(t,BN_DEC_CONV);
              ^
136.   			lp++;
137.   			}

crypto/bn/bn_word.c:88:2: Assignment
  86.   BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w)
  87.   	{
  88.   	BN_ULONG ret = 0;
         ^
  89.   	int i;
  90.   

crypto/bn/bn_word.c:104:5: Call
  102.   		
  103.   		l=a->d[i];
  104.   		d=bn_div_words(ret,l,w);
             ^
  105.   		ret=(l-((d*w)&BN_MASK2))&BN_MASK2;
  106.   		a->d[i]=d;

crypto/bn/bn_asm.c:232:1: <LHS trace>
230.   /* Divide h,l by d and return the result. */
231.   /* I need to test this some more :-( */
232. > BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
233.   	{
234.   	BN_ULONG dh,dl,q,ret=0,th,tl,t;

crypto/bn/bn_asm.c:232:1: Parameter `d`
    230.   /* Divide h,l by d and return the result. */
    231.   /* I need to test this some more :-( */
    232. > BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
    233.   	{
    234.   	BN_ULONG dh,dl,q,ret=0,th,tl,t;

crypto/bn/bn_asm.c:232:1: <RHS trace>
230.   /* Divide h,l by d and return the result. */
231.   /* I need to test this some more :-( */
232. > BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
233.   	{
234.   	BN_ULONG dh,dl,q,ret=0,th,tl,t;

crypto/bn/bn_asm.c:232:1: Parameter `d`
    230.   /* Divide h,l by d and return the result. */
    231.   /* I need to test this some more :-( */
    232. > BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
    233.   	{
    234.   	BN_ULONG dh,dl,q,ret=0,th,tl,t;

crypto/bn/bn_asm.c:243:14: Binary operation: ([1, 4294967295] - [1, 1000000000]):unsigned64 by call to `BN_div_word` 
    241.   
    242.   	i=BN_BITS2-i;
    243.   	if (h >= d) h-=d;
                        ^
    244.   
    245.   	if (i)

BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
	{
	BN_ULONG dh,dl,q,ret=0,th,tl,t;
	int i,count=2;
	if (d == 0) return(BN_MASK2);
	i=BN_num_bits_word(d);
	assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i));
	i=BN_BITS2-i;
	if (h >= d) h-=d;
	if (i)
		{
		d<<=i;
		h=(h<<i)|(l>>(BN_BITS2-i));
		l<<=i;
		}
	dh=(d&BN_MASK2h)>>BN_BITS4;
	dl=(d&BN_MASK2l);
	for (;;)
		{
		if ((h>>BN_BITS4) == dh)
			q=BN_MASK2l;
		else
			q=h/dh;
		th=q*dh;
		tl=dl*q;
		for (;;)
			{
			t=h-th;
			if ((t&BN_MASK2h) ||
				((tl) <= (
					(t<<BN_BITS4)|
					((l&BN_MASK2h)>>BN_BITS4))))
				break;
			q--;
			th-=dh;
			tl-=dl;
			}
		t=(tl>>BN_BITS4);
		tl=(tl<<BN_BITS4)&BN_MASK2h;
		th+=t;
		if (l < tl) th++;
		l-=tl;
		if (h < th)
			{
			h+=d;
			q--;
			}
		h-=th;
		if (--count == 0) break;
		ret=q<<BN_BITS4;
		h=((h<<BN_BITS4)|(l>>BN_BITS4))&BN_MASK2;
		l=(l&BN_MASK2l)<<BN_BITS4;
		}
	ret|=q;
	return(ret);
	}
["char *BN_bn2dec(const BIGNUM *a)\n\t{\n\tint i=0,num;\n\tchar *buf=NULL;\n\tchar *p;\n\tBIGNUM *t=NULL;\n\tBN_ULONG *bn_data=NULL,*lp;\n\ti=BN_num_bits(a)*3;\n\tnum=(i/10+i/1000+3)+1;\n\tbn_data=(BN_ULONG *)OPENSSL_malloc((num/BN_DEC_NUM+1)*sizeof(BN_ULONG));\n\tbuf=(char *)OPENSSL_malloc(num+3);\n\tif ((buf == NULL) || (bn_data == NULL))\n\t\t{\n\t\tBNerr(BN_F_BN_BN2DEC,ERR_R_MALLOC_FAILURE);\n\t\tgoto err;\n\t\t}\n\tif ((t=BN_dup(a)) == NULL) goto err;\n\tp=buf;\n\tlp=bn_data;\n\tif (t->neg) *(p++)='-';\n\tif (t->top == 0)\n\t\t{\n\t\t*(p++)='0';\n\t\t*(p++)='\\0';\n\t\t}\n\telse\n\t\t{\n\t\ti=0;\n\t\twhile (!BN_is_zero(t))\n\t\t\t{\n\t\t\t*lp=BN_div_word(t,BN_DEC_CONV);\n\t\t\tlp++;\n\t\t\t}\n\t\tlp--;\n\t\tsprintf(p,BN_DEC_FMT1,*lp);\n\t\twhile (*p) p++;\n\t\twhile (lp != bn_data)\n\t\t\t{\n\t\t\tlp--;\n\t\t\tsprintf(p,BN_DEC_FMT2,*lp);\n\t\t\twhile (*p) p++;\n\t\t\t}\n\t\t}\nerr:\n\tif (bn_data != NULL) OPENSSL_free(bn_data);\n\tif (t != NULL) BN_free(t);\n\treturn(buf);\n\t}", 'BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w)\n\t{\n\tBN_ULONG ret = 0;\n\tint i;\n\tw &= BN_MASK2;\n\tif (!w)\n\t\treturn 0;\n\tif (a->top == 0)\n\t\treturn 0;\n\tfor (i=a->top-1; i>=0; i--)\n\t\t{\n\t\tBN_ULONG l,d;\n\t\tl=a->d[i];\n\t\td=bn_div_words(ret,l,w);\n\t\tret=(l-((d*w)&BN_MASK2))&BN_MASK2;\n\t\ta->d[i]=d;\n\t\t}\n\tif ((a->top > 0) && (a->d[a->top-1] == 0))\n\t\ta->top--;\n\tbn_check_top(a);\n\treturn(ret);\n\t}', 'BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)\n\t{\n\tBN_ULONG dh,dl,q,ret=0,th,tl,t;\n\tint i,count=2;\n\tif (d == 0) return(BN_MASK2);\n\ti=BN_num_bits_word(d);\n\tassert((i == BN_BITS2) || (h > (BN_ULONG)1<<i));\n\ti=BN_BITS2-i;\n\tif (h >= d) h-=d;\n\tif (i)\n\t\t{\n\t\td<<=i;\n\t\th=(h<<i)|(l>>(BN_BITS2-i));\n\t\tl<<=i;\n\t\t}\n\tdh=(d&BN_MASK2h)>>BN_BITS4;\n\tdl=(d&BN_MASK2l);\n\tfor (;;)\n\t\t{\n\t\tif ((h>>BN_BITS4) == dh)\n\t\t\tq=BN_MASK2l;\n\t\telse\n\t\t\tq=h/dh;\n\t\tth=q*dh;\n\t\ttl=dl*q;\n\t\tfor (;;)\n\t\t\t{\n\t\t\tt=h-th;\n\t\t\tif ((t&BN_MASK2h) ||\n\t\t\t\t((tl) <= (\n\t\t\t\t\t(t<<BN_BITS4)|\n\t\t\t\t\t((l&BN_MASK2h)>>BN_BITS4))))\n\t\t\t\tbreak;\n\t\t\tq--;\n\t\t\tth-=dh;\n\t\t\ttl-=dl;\n\t\t\t}\n\t\tt=(tl>>BN_BITS4);\n\t\ttl=(tl<<BN_BITS4)&BN_MASK2h;\n\t\tth+=t;\n\t\tif (l < tl) th++;\n\t\tl-=tl;\n\t\tif (h < th)\n\t\t\t{\n\t\t\th+=d;\n\t\t\tq--;\n\t\t\t}\n\t\th-=th;\n\t\tif (--count == 0) break;\n\t\tret=q<<BN_BITS4;\n\t\th=((h<<BN_BITS4)|(l>>BN_BITS4))&BN_MASK2;\n\t\tl=(l&BN_MASK2l)<<BN_BITS4;\n\t\t}\n\tret|=q;\n\treturn(ret);\n\t}']