crypto/idea/i_skey.c:91: error: BUFFER_OVERRUN_L1
  Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: 6.
Showing all 5 steps of the trace


crypto/idea/i_skey.c:62:1: <Length trace>
60.   
61.   static IDEA_INT inverse(unsigned int xin);
62. > void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
63.   {
64.       int i;

crypto/idea/i_skey.c:62:1: Parameter `ks->data[*][*]`
60.   
61.   static IDEA_INT inverse(unsigned int xin);
62. > void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
63.   {
64.       int i;

crypto/idea/i_skey.c:67:5: Assignment
65.       register IDEA_INT *kt, *kf, r0, r1, r2;
66.   
67.       kt = &(ks->data[0][0]);
          ^
68.       n2s(key, kt[0]);
69.       n2s(key, kt[1]);

crypto/idea/i_skey.c:77:5: Assignment
75.       n2s(key, kt[7]);
76.   
77.       kf = kt;
          ^
78.       kt += 8;
79.       for (i = 0; i < 6; i++) {

crypto/idea/i_skey.c:91:14: Array access: Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: 6
89.           r1 = kf[6];
90.           *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;
91.           r0 = kf[7];
                   ^
92.           *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;
93.           r1 = kf[0];

void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
{
    int i;
    register IDEA_INT *kt, *kf, r0, r1, r2;
    kt = &(ks->data[0][0]);
    n2s(key, kt[0]);
    n2s(key, kt[1]);
    n2s(key, kt[2]);
    n2s(key, kt[3]);
    n2s(key, kt[4]);
    n2s(key, kt[5]);
    n2s(key, kt[6]);
    n2s(key, kt[7]);
    kf = kt;
    kt += 8;
    for (i = 0; i < 6; i++) {
        r2 = kf[1];
        r1 = kf[2];
        *(kt++) = ((r2 << 9) | (r1 >> 7)) & 0xffff;
        r0 = kf[3];
        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;
        r1 = kf[4];
        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;
        r0 = kf[5];
        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;
        r1 = kf[6];
        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;
        r0 = kf[7];
        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;
        r1 = kf[0];
        if (i >= 5)
            break;
        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;
        *(kt++) = ((r1 << 9) | (r2 >> 7)) & 0xffff;
        kf += 8;
    }
}
['void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)\n{\n    int i;\n    register IDEA_INT *kt, *kf, r0, r1, r2;\n    kt = &(ks->data[0][0]);\n    n2s(key, kt[0]);\n    n2s(key, kt[1]);\n    n2s(key, kt[2]);\n    n2s(key, kt[3]);\n    n2s(key, kt[4]);\n    n2s(key, kt[5]);\n    n2s(key, kt[6]);\n    n2s(key, kt[7]);\n    kf = kt;\n    kt += 8;\n    for (i = 0; i < 6; i++) {\n        r2 = kf[1];\n        r1 = kf[2];\n        *(kt++) = ((r2 << 9) | (r1 >> 7)) & 0xffff;\n        r0 = kf[3];\n        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;\n        r1 = kf[4];\n        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;\n        r0 = kf[5];\n        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;\n        r1 = kf[6];\n        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;\n        r0 = kf[7];\n        *(kt++) = ((r1 << 9) | (r0 >> 7)) & 0xffff;\n        r1 = kf[0];\n        if (i >= 5)\n            break;\n        *(kt++) = ((r0 << 9) | (r1 >> 7)) & 0xffff;\n        *(kt++) = ((r1 << 9) | (r2 >> 7)) & 0xffff;\n        kf += 8;\n    }\n}']