ssl/s2_lib.c:370: error: INTEGER_OVERFLOW_L2
  (1 - [-oo, 127]):unsigned64 by call to `MD5_Update`.
Showing all 10 steps of the trace


ssl/s2_lib.c:367:3: Call
365.   	for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH)
366.   		{
367.   		MD5_Init(&ctx);
         ^
368.   
369.   		MD5_Update(&ctx,s->session->master_key,s->session->master_key_length);

crypto/md5/md5_dgst.c:87:2: Assignment
  85.   	c->Nl=0;
  86.   	c->Nh=0;
  87.   	c->num=0;
         ^
  88.   	}
  89.   

ssl/s2_lib.c:369:3: Call
367.   		MD5_Init(&ctx);
368.   
369.   		MD5_Update(&ctx,s->session->master_key,s->session->master_key_length);
         ^
370.   		MD5_Update(&ctx,(unsigned char *)&c,1);
371.   		c++;

crypto/md5/md5_dgst.c:90:1: Parameter `c->num`
  88.   	}
  89.   
  90. > void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
  91.   	{
  92.   	register const unsigned char *data=_data;

ssl/s2_lib.c:370:3: Call
368.   
369.   		MD5_Update(&ctx,s->session->master_key,s->session->master_key_length);
370.   		MD5_Update(&ctx,(unsigned char *)&c,1);
         ^
371.   		c++;
372.   		MD5_Update(&ctx,s->s2->challenge,s->s2->challenge_length);

crypto/md5/md5_dgst.c:90:1: <LHS trace>
88.   	}
89.   
90. > void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
91.   	{
92.   	register const unsigned char *data=_data;

crypto/md5/md5_dgst.c:90:1: Parameter `len`
  88.   	}
  89.   
  90. > void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
  91.   	{
  92.   	register const unsigned char *data=_data;

crypto/md5/md5_dgst.c:90:1: <RHS trace>
88.   	}
89.   
90. > void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
91.   	{
92.   	register const unsigned char *data=_data;

crypto/md5/md5_dgst.c:90:1: Parameter `len`
  88.   	}
  89.   
  90. > void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
  91.   	{
  92.   	register const unsigned char *data=_data;

crypto/md5/md5_dgst.c:123:4: Binary operation: (1 - [-oo, 127]):unsigned64 by call to `MD5_Update` 
  121.   				p[sw]=l;
  122.   				}
  123.   			len-=(MD5_CBLOCK-c->num);
            ^
  124.   
  125.   			md5_block(c,p,64);

void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)
	{
	register const unsigned char *data=_data;
	register ULONG *p;
	int sw,sc;
	ULONG l;
	if (len == 0) return;
	l=(c->Nl+(len<<3))&0xffffffffL;
	if (l < c->Nl)
		c->Nh++;
	c->Nh+=(len>>29);
	c->Nl=l;
	if (c->num != 0)
		{
		p=c->data;
		sw=c->num>>2;
		sc=c->num&0x03;
		if ((c->num+len) >= MD5_CBLOCK)
			{
			l= p[sw];
			p_c2l(data,l,sc);
			p[sw++]=l;
			for (; sw<MD5_LBLOCK; sw++)
				{
				c2l(data,l);
				p[sw]=l;
				}
			len-=(MD5_CBLOCK-c->num);
			md5_block(c,p,64);
			c->num=0;
			}
		else
			{
			int ew,ec;
			c->num+=(int)len;
			if ((sc+len) < 4)
				{
				l= p[sw];
				p_c2l_p(data,l,sc,len);
				p[sw]=l;
				}
			else
				{
				ew=(c->num>>2);
				ec=(c->num&0x03);
				l= p[sw];
				p_c2l(data,l,sc);
				p[sw++]=l;
				for (; sw < ew; sw++)
					{ c2l(data,l); p[sw]=l; }
				if (ec)
					{
					c2l_p(data,l,ec);
					p[sw]=l;
					}
				}
			return;
			}
		}
#ifdef L_ENDIAN
	if ((((unsigned long)data)%sizeof(ULONG)) == 0)
		{
		sw=(int)len/MD5_CBLOCK;
		if (sw > 0)
			{
			sw*=MD5_CBLOCK;
			md5_block(c,(ULONG *)data,sw);
			data+=sw;
			len-=sw;
			}
		}
#endif
	p=c->data;
	while (len >= MD5_CBLOCK)
		{
#if defined(L_ENDIAN) || defined(B_ENDIAN)
		if (p != (unsigned long *)data)
			memcpy(p,data,MD5_CBLOCK);
		data+=MD5_CBLOCK;
#ifdef B_ENDIAN
		for (sw=(MD5_LBLOCK/4); sw; sw--)
			{
			Endian_Reverse32(p[0]);
			Endian_Reverse32(p[1]);
			Endian_Reverse32(p[2]);
			Endian_Reverse32(p[3]);
			p+=4;
			}
#endif
#else
		for (sw=(MD5_LBLOCK/4); sw; sw--)
			{
			c2l(data,l); *(p++)=l;
			c2l(data,l); *(p++)=l;
			c2l(data,l); *(p++)=l;
			c2l(data,l); *(p++)=l;
			}
#endif
		p=c->data;
		md5_block(c,p,64);
		len-=MD5_CBLOCK;
		}
	sc=(int)len;
	c->num=sc;
	if (sc)
		{
		sw=sc>>2;
#ifdef L_ENDIAN
		p[sw]=0;
		memcpy(p,data,sc);
#else
		sc&=0x03;
		for ( ; sw; sw--)
			{ c2l(data,l); *(p++)=l; }
		c2l_p(data,l,sc);
		*p=l;
#endif
		}
	}
["void ssl2_generate_key_material(SSL *s)\n\t{\n\tunsigned int i;\n\tMD5_CTX ctx;\n\tunsigned char *km;\n\tunsigned char c='0';\n\tkm=s->s2->key_material;\n\tfor (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH)\n\t\t{\n\t\tMD5_Init(&ctx);\n\t\tMD5_Update(&ctx,s->session->master_key,s->session->master_key_length);\n\t\tMD5_Update(&ctx,(unsigned char *)&c,1);\n\t\tc++;\n\t\tMD5_Update(&ctx,s->s2->challenge,s->s2->challenge_length);\n\t\tMD5_Update(&ctx,s->s2->conn_id,s->s2->conn_id_length);\n\t\tMD5_Final(km,&ctx);\n\t\tkm+=MD5_DIGEST_LENGTH;\n\t\t}\n\t}", 'void MD5_Init(MD5_CTX *c)\n\t{\n\tc->A=INIT_DATA_A;\n\tc->B=INIT_DATA_B;\n\tc->C=INIT_DATA_C;\n\tc->D=INIT_DATA_D;\n\tc->Nl=0;\n\tc->Nh=0;\n\tc->num=0;\n\t}', 'void MD5_Update(MD5_CTX *c, const void *_data, unsigned long len)\n\t{\n\tregister const unsigned char *data=_data;\n\tregister ULONG *p;\n\tint sw,sc;\n\tULONG l;\n\tif (len == 0) return;\n\tl=(c->Nl+(len<<3))&0xffffffffL;\n\tif (l < c->Nl)\n\t\tc->Nh++;\n\tc->Nh+=(len>>29);\n\tc->Nl=l;\n\tif (c->num != 0)\n\t\t{\n\t\tp=c->data;\n\t\tsw=c->num>>2;\n\t\tsc=c->num&0x03;\n\t\tif ((c->num+len) >= MD5_CBLOCK)\n\t\t\t{\n\t\t\tl= p[sw];\n\t\t\tp_c2l(data,l,sc);\n\t\t\tp[sw++]=l;\n\t\t\tfor (; sw<MD5_LBLOCK; sw++)\n\t\t\t\t{\n\t\t\t\tc2l(data,l);\n\t\t\t\tp[sw]=l;\n\t\t\t\t}\n\t\t\tlen-=(MD5_CBLOCK-c->num);\n\t\t\tmd5_block(c,p,64);\n\t\t\tc->num=0;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tint ew,ec;\n\t\t\tc->num+=(int)len;\n\t\t\tif ((sc+len) < 4)\n\t\t\t\t{\n\t\t\t\tl= p[sw];\n\t\t\t\tp_c2l_p(data,l,sc,len);\n\t\t\t\tp[sw]=l;\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tew=(c->num>>2);\n\t\t\t\tec=(c->num&0x03);\n\t\t\t\tl= p[sw];\n\t\t\t\tp_c2l(data,l,sc);\n\t\t\t\tp[sw++]=l;\n\t\t\t\tfor (; sw < ew; sw++)\n\t\t\t\t\t{ c2l(data,l); p[sw]=l; }\n\t\t\t\tif (ec)\n\t\t\t\t\t{\n\t\t\t\t\tc2l_p(data,l,ec);\n\t\t\t\t\tp[sw]=l;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn;\n\t\t\t}\n\t\t}\n#ifdef L_ENDIAN\n\tif ((((unsigned long)data)%sizeof(ULONG)) == 0)\n\t\t{\n\t\tsw=(int)len/MD5_CBLOCK;\n\t\tif (sw > 0)\n\t\t\t{\n\t\t\tsw*=MD5_CBLOCK;\n\t\t\tmd5_block(c,(ULONG *)data,sw);\n\t\t\tdata+=sw;\n\t\t\tlen-=sw;\n\t\t\t}\n\t\t}\n#endif\n\tp=c->data;\n\twhile (len >= MD5_CBLOCK)\n\t\t{\n#if defined(L_ENDIAN) || defined(B_ENDIAN)\n\t\tif (p != (unsigned long *)data)\n\t\t\tmemcpy(p,data,MD5_CBLOCK);\n\t\tdata+=MD5_CBLOCK;\n#ifdef B_ENDIAN\n\t\tfor (sw=(MD5_LBLOCK/4); sw; sw--)\n\t\t\t{\n\t\t\tEndian_Reverse32(p[0]);\n\t\t\tEndian_Reverse32(p[1]);\n\t\t\tEndian_Reverse32(p[2]);\n\t\t\tEndian_Reverse32(p[3]);\n\t\t\tp+=4;\n\t\t\t}\n#endif\n#else\n\t\tfor (sw=(MD5_LBLOCK/4); sw; sw--)\n\t\t\t{\n\t\t\tc2l(data,l); *(p++)=l;\n\t\t\tc2l(data,l); *(p++)=l;\n\t\t\tc2l(data,l); *(p++)=l;\n\t\t\tc2l(data,l); *(p++)=l;\n\t\t\t}\n#endif\n\t\tp=c->data;\n\t\tmd5_block(c,p,64);\n\t\tlen-=MD5_CBLOCK;\n\t\t}\n\tsc=(int)len;\n\tc->num=sc;\n\tif (sc)\n\t\t{\n\t\tsw=sc>>2;\n#ifdef L_ENDIAN\n\t\tp[sw]=0;\n\t\tmemcpy(p,data,sc);\n#else\n\t\tsc&=0x03;\n\t\tfor ( ; sw; sw--)\n\t\t\t{ c2l(data,l); *(p++)=l; }\n\t\tc2l_p(data,l,sc);\n\t\t*p=l;\n#endif\n\t\t}\n\t}']