crypto/rc4/rc4_skey.c:147: error: BUFFER_OVERRUN_L2
  Offset: [3, 258] Size: 256.
Showing all 6 steps of the trace


crypto/rc4/rc4_skey.c:142:7: <Offset trace>
140.   #endif
141.   	for (i=0; i < 256; i++) d[i]=i;
142.   	for (i=0; i < 256; i+=4)
             ^
143.   		{
144.   		SK_LOOP(d,i+0);

crypto/rc4/rc4_skey.c:142:7: Assignment
140.   #endif
141.   	for (i=0; i < 256; i++) d[i]=i;
142.   	for (i=0; i < 256; i+=4)
             ^
143.   		{
144.   		SK_LOOP(d,i+0);

crypto/rc4/rc4_skey.c:88:1: <Length trace>
86.    */
87.   
88. > void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
89.   	{
90.           register RC4_INT tmp;

crypto/rc4/rc4_skey.c:88:1: Parameter `key->data[*]`
86.    */
87.   
88. > void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
89.   	{
90.           register RC4_INT tmp;

crypto/rc4/rc4_skey.c:95:9: Assignment
93.           unsigned int i;
94.           
95.           d= &(key->data[0]);
              ^
96.           key->x = 0;     
97.           key->y = 0;     

crypto/rc4/rc4_skey.c:147:3: Array access: Offset: [3, 258] Size: 256
145.   		SK_LOOP(d,i+1);
146.   		SK_LOOP(d,i+2);
147.   		SK_LOOP(d,i+3);
         ^
148.   		}
149.   	}

void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
	{
        register RC4_INT tmp;
        register int id1,id2;
        register RC4_INT *d;
        unsigned int i;
        d= &(key->data[0]);
        key->x = 0;
        key->y = 0;
        id1=id2=0;
#define SK_LOOP(d,n) { \
		tmp=d[(n)]; \
		id2 = (data[id1] + tmp + id2) & 0xff; \
		if (++id1 == len) id1=0; \
		d[(n)]=d[id2]; \
		d[id2]=tmp; }
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM)
# if	defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
	defined(__INTEL__) || \
	defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64)
	if (sizeof(RC4_INT) > 1) {
		if (OPENSSL_ia32cap_P & (1<<28)) {
			unsigned char *cp=(unsigned char *)d;
			for (i=0;i<256;i++) cp[i]=i;
			for (i=0;i<256;i++) SK_LOOP(cp,i);
			d[256/sizeof(RC4_INT)]=-1;
			return;
		}
	}
# endif
#endif
	for (i=0; i < 256; i++) d[i]=i;
	for (i=0; i < 256; i+=4)
		{
		SK_LOOP(d,i+0);
		SK_LOOP(d,i+1);
		SK_LOOP(d,i+2);
		SK_LOOP(d,i+3);
		}
	}
['void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)\n\t{\n        register RC4_INT tmp;\n        register int id1,id2;\n        register RC4_INT *d;\n        unsigned int i;\n        d= &(key->data[0]);\n        key->x = 0;\n        key->y = 0;\n        id1=id2=0;\n#define SK_LOOP(d,n) { \\\n\t\ttmp=d[(n)]; \\\n\t\tid2 = (data[id1] + tmp + id2) & 0xff; \\\n\t\tif (++id1 == len) id1=0; \\\n\t\td[(n)]=d[id2]; \\\n\t\td[id2]=tmp; }\n#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM)\n# if\tdefined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \\\n\tdefined(__INTEL__) || \\\n\tdefined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64)\n\tif (sizeof(RC4_INT) > 1) {\n\t\tif (OPENSSL_ia32cap_P & (1<<28)) {\n\t\t\tunsigned char *cp=(unsigned char *)d;\n\t\t\tfor (i=0;i<256;i++) cp[i]=i;\n\t\t\tfor (i=0;i<256;i++) SK_LOOP(cp,i);\n\t\t\td[256/sizeof(RC4_INT)]=-1;\n\t\t\treturn;\n\t\t}\n\t}\n# endif\n#endif\n\tfor (i=0; i < 256; i++) d[i]=i;\n\tfor (i=0; i < 256; i+=4)\n\t\t{\n\t\tSK_LOOP(d,i+0);\n\t\tSK_LOOP(d,i+1);\n\t\tSK_LOOP(d,i+2);\n\t\tSK_LOOP(d,i+3);\n\t\t}\n\t}']