crypto/mdc2/mdc2dgst.c:139: error: BUFFER_OVERRUN_L2
  Offset: [-1, 28] Size: 16 by call to `des_encrypt`.
Showing all 8 steps of the trace


crypto/mdc2/mdc2dgst.c:121:1: Array declaration
119.   	}
120.   
121. > static void mdc2_body(MDC2_CTX *c, unsigned char *in, unsigned int len)
122.   	{
123.   	register DES_LONG tin0,tin1;

crypto/mdc2/mdc2dgst.c:139:3: Call
137.   		des_set_odd_parity(&c->h);
138.   		des_set_key(&c->h,k);
139.   		des_encrypt(d,k,1);
         ^
140.   
141.   		des_set_odd_parity(&c->hh);

crypto/des/des_enc.c:139:8: <Offset trace>
137.   		D_ENCRYPT(r,l, 0); /*  1 */
138.   #else
139.   		for (i=30; i>0; i-=8)
              ^
140.   			{
141.   			D_ENCRYPT(l,r,i-0); /* 16 */

crypto/des/des_enc.c:139:8: Assignment
  137.   		D_ENCRYPT(r,l, 0); /*  1 */
  138.   #else
  139.   		for (i=30; i>0; i-=8)
                ^
  140.   			{
  141.   			D_ENCRYPT(l,r,i-0); /* 16 */

crypto/des/des_enc.c:61:1: <Length trace>
59.   #include "des_locl.h"
60.   
61. > void des_encrypt(DES_LONG *data, des_key_schedule ks, int enc)
62.   	{
63.   	register DES_LONG l,r,t,u;

crypto/des/des_enc.c:61:1: Parameter `*ks`
  59.   #include "des_locl.h"
  60.   
  61. > void des_encrypt(DES_LONG *data, des_key_schedule ks, int enc)
  62.   	{
  63.   	register DES_LONG l,r,t,u;

crypto/des/des_enc.c:87:2: Assignment
  85.   	l=ROTATE(l,29)&0xffffffffL;
  86.   
  87.   	s=(DES_LONG *)ks;
         ^
  88.   	/* I don't know if it is worth the effort of loop unrolling the
  89.   	 * inner loop */

crypto/des/des_enc.c:142:4: Array access: Offset: [-1, 28] Size: 16 by call to `des_encrypt` 
  140.   			{
  141.   			D_ENCRYPT(l,r,i-0); /* 16 */
  142.   			D_ENCRYPT(r,l,i-2); /* 15 */
            ^
  143.   			D_ENCRYPT(l,r,i-4); /* 14 */
  144.   			D_ENCRYPT(r,l,i-6); /* 13 */

void des_encrypt(DES_LONG *data, des_key_schedule ks, int enc)
	{
	register DES_LONG l,r,t,u;
#ifdef DES_PTR
	register const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
#endif
#ifndef DES_UNROLL
	register int i;
#endif
	register DES_LONG *s;
	r=data[0];
	l=data[1];
	IP(r,l);
	r=ROTATE(r,29)&0xffffffffL;
	l=ROTATE(l,29)&0xffffffffL;
	s=(DES_LONG *)ks;
	if (enc)
		{
#ifdef DES_UNROLL
		D_ENCRYPT(l,r, 0);
		D_ENCRYPT(r,l, 2);
		D_ENCRYPT(l,r, 4);
		D_ENCRYPT(r,l, 6);
		D_ENCRYPT(l,r, 8);
		D_ENCRYPT(r,l,10);
		D_ENCRYPT(l,r,12);
		D_ENCRYPT(r,l,14);
		D_ENCRYPT(l,r,16);
		D_ENCRYPT(r,l,18);
		D_ENCRYPT(l,r,20);
		D_ENCRYPT(r,l,22);
		D_ENCRYPT(l,r,24);
		D_ENCRYPT(r,l,26);
		D_ENCRYPT(l,r,28);
		D_ENCRYPT(r,l,30);
#else
		for (i=0; i<32; i+=8)
			{
			D_ENCRYPT(l,r,i+0);
			D_ENCRYPT(r,l,i+2);
			D_ENCRYPT(l,r,i+4);
			D_ENCRYPT(r,l,i+6);
			}
#endif
		}
	else
		{
#ifdef DES_UNROLL
		D_ENCRYPT(l,r,30);
		D_ENCRYPT(r,l,28);
		D_ENCRYPT(l,r,26);
		D_ENCRYPT(r,l,24);
		D_ENCRYPT(l,r,22);
		D_ENCRYPT(r,l,20);
		D_ENCRYPT(l,r,18);
		D_ENCRYPT(r,l,16);
		D_ENCRYPT(l,r,14);
		D_ENCRYPT(r,l,12);
		D_ENCRYPT(l,r,10);
		D_ENCRYPT(r,l, 8);
		D_ENCRYPT(l,r, 6);
		D_ENCRYPT(r,l, 4);
		D_ENCRYPT(l,r, 2);
		D_ENCRYPT(r,l, 0);
#else
		for (i=30; i>0; i-=8)
			{
			D_ENCRYPT(l,r,i-0);
			D_ENCRYPT(r,l,i-2);
			D_ENCRYPT(l,r,i-4);
			D_ENCRYPT(r,l,i-6);
			}
#endif
		}
	l=ROTATE(l,3)&0xffffffffL;
	r=ROTATE(r,3)&0xffffffffL;
	FP(r,l);
	data[0]=l;
	data[1]=r;
	l=r=t=u=0;
	}
['static void mdc2_body(MDC2_CTX *c, unsigned char *in, unsigned int len)\n\t{\n\tregister DES_LONG tin0,tin1;\n\tregister DES_LONG ttin0,ttin1;\n\tDES_LONG d[2],dd[2];\n\tdes_key_schedule k;\n\tunsigned char *p;\n\tunsigned int i;\n\tfor (i=0; i<len; i+=8)\n\t\t{\n\t\tc2l(in,tin0); d[0]=dd[0]=tin0;\n\t\tc2l(in,tin1); d[1]=dd[1]=tin1;\n\t\tc->h[0]=(c->h[0]&0x9f)|0x40;\n\t\tc->hh[0]=(c->hh[0]&0x9f)|0x20;\n\t\tdes_set_odd_parity(&c->h);\n\t\tdes_set_key(&c->h,k);\n\t\tdes_encrypt(d,k,1);\n\t\tdes_set_odd_parity(&c->hh);\n\t\tdes_set_key(&c->hh,k);\n\t\tdes_encrypt(dd,k,1);\n\t\tttin0=tin0^dd[0];\n\t\tttin1=tin1^dd[1];\n\t\ttin0^=d[0];\n\t\ttin1^=d[1];\n\t\tp=c->h;\n\t\tl2c(tin0,p);\n\t\tl2c(ttin1,p);\n\t\tp=c->hh;\n\t\tl2c(ttin0,p);\n\t\tl2c(tin1,p);\n\t\t}\n\t}', 'void des_encrypt(DES_LONG *data, des_key_schedule ks, int enc)\n\t{\n\tregister DES_LONG l,r,t,u;\n#ifdef DES_PTR\n\tregister const unsigned char *des_SP=(const unsigned char *)des_SPtrans;\n#endif\n#ifndef DES_UNROLL\n\tregister int i;\n#endif\n\tregister DES_LONG *s;\n\tr=data[0];\n\tl=data[1];\n\tIP(r,l);\n\tr=ROTATE(r,29)&0xffffffffL;\n\tl=ROTATE(l,29)&0xffffffffL;\n\ts=(DES_LONG *)ks;\n\tif (enc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