libavutil/sha.c:123: error: Buffer Overrun L2
  Offset: [64, 83] Size: 80.

libavutil/sha.c:104:10: <Offset trace>
102.     R1(c, d, e, a, b, 18);
103.     R1(b, c, d, e, a, 19);
104.     for (i = 20; i < 40; i += 5) {
              ^
105.         R2(a, b, c, d, e, 0 + i);
106.         R2(e, a, b, c, d, 1 + i);

libavutil/sha.c:104:10: Assignment
102.     R1(c, d, e, a, b, 18);
103.     R1(b, c, d, e, a, 19);
104.     for (i = 20; i < 40; i += 5) {
              ^
105.         R2(a, b, c, d, e, 0 + i);
106.         R2(e, a, b, c, d, 1 + i);

libavutil/sha.c:55:1: <Length trace>
53. /* Hash a single 512-bit block. This is the core of the algorithm. */
54. 
55. static void sha1_transform(uint32_t state[5], const uint8_t buffer[64])
    ^
56. {
57.     uint32_t block[80];

libavutil/sha.c:55:1: Array declaration
53. /* Hash a single 512-bit block. This is the core of the algorithm. */
54. 
55. static void sha1_transform(uint32_t state[5], const uint8_t buffer[64])
    ^
56. {
57.     uint32_t block[80];

libavutil/sha.c:123:9: Array access: Offset: [64, 83] Size: 80
121.         R4(d, e, a, b, c, 2 + i);
122.         R4(c, d, e, a, b, 3 + i);
123.         R4(b, c, d, e, a, 4 + i);
             ^
124.     }
125. #endif

static void sha1_transform(uint32_t state[5], const uint8_t buffer[64])
{
    uint32_t block[80];
    unsigned int i, a, b, c, d, e;
    a = state[0];
    b = state[1];
    c = state[2];
    d = state[3];
    e = state[4];
#if CONFIG_SMALL
    for (i = 0; i < 80; i++) {
        int t;
        if (i < 16)
            t = be2me_32(((uint32_t*)buffer)[i]);
        else
            t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1);
        block[i] = t;
        t += e + rol(a, 5);
        if (i < 40) {
            if (i < 20)
                t += ((b&(c^d))^d)     + 0x5A827999;
            else
                t += ( b^c     ^d)     + 0x6ED9EBA1;
        } else {
            if (i < 60)
                t += (((b|c)&d)|(b&c)) + 0x8F1BBCDC;
            else
                t += ( b^c     ^d)     + 0xCA62C1D6;
        }
        e = d;
        d = c;
        c = rol(b, 30);
        b = a;
        a = t;
    }
#else
    for (i = 0; i < 15; i += 5) {
        R0(a, b, c, d, e, 0 + i);
        R0(e, a, b, c, d, 1 + i);
        R0(d, e, a, b, c, 2 + i);
        R0(c, d, e, a, b, 3 + i);
        R0(b, c, d, e, a, 4 + i);
    }
    R0(a, b, c, d, e, 15);
    R1(e, a, b, c, d, 16);
    R1(d, e, a, b, c, 17);
    R1(c, d, e, a, b, 18);
    R1(b, c, d, e, a, 19);
    for (i = 20; i < 40; i += 5) {
        R2(a, b, c, d, e, 0 + i);
        R2(e, a, b, c, d, 1 + i);
        R2(d, e, a, b, c, 2 + i);
        R2(c, d, e, a, b, 3 + i);
        R2(b, c, d, e, a, 4 + i);
    }
    for (; i < 60; i += 5) {
        R3(a, b, c, d, e, 0 + i);
        R3(e, a, b, c, d, 1 + i);
        R3(d, e, a, b, c, 2 + i);
        R3(c, d, e, a, b, 3 + i);
        R3(b, c, d, e, a, 4 + i);
    }
    for (; i < 80; i += 5) {
        R4(a, b, c, d, e, 0 + i);
        R4(e, a, b, c, d, 1 + i);
        R4(d, e, a, b, c, 2 + i);
        R4(c, d, e, a, b, 3 + i);
        R4(b, c, d, e, a, 4 + i);
    }
#endif
    state[0] += a;
    state[1] += b;
    state[2] += c;
    state[3] += d;
    state[4] += e;
}
['static void sha1_transform(uint32_t state[5], const uint8_t buffer[64])\n{\n    uint32_t block[80];\n    unsigned int i, a, b, c, d, e;\n    a = state[0];\n    b = state[1];\n    c = state[2];\n    d = state[3];\n    e = state[4];\n#if CONFIG_SMALL\n    for (i = 0; i < 80; i++) {\n        int t;\n        if (i < 16)\n            t = be2me_32(((uint32_t*)buffer)[i]);\n        else\n            t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1);\n        block[i] = t;\n        t += e + rol(a, 5);\n        if (i < 40) {\n            if (i < 20)\n                t += ((b&(c^d))^d)     + 0x5A827999;\n            else\n                t += ( b^c     ^d)     + 0x6ED9EBA1;\n        } else {\n            if (i < 60)\n                t += (((b|c)&d)|(b&c)) + 0x8F1BBCDC;\n            else\n                t += ( b^c     ^d)     + 0xCA62C1D6;\n        }\n        e = d;\n        d = c;\n        c = rol(b, 30);\n        b = a;\n        a = t;\n    }\n#else\n    for (i = 0; i < 15; i += 5) {\n        R0(a, b, c, d, e, 0 + i);\n        R0(e, a, b, c, d, 1 + i);\n        R0(d, e, a, b, c, 2 + i);\n        R0(c, d, e, a, b, 3 + i);\n        R0(b, c, d, e, a, 4 + i);\n    }\n    R0(a, b, c, d, e, 15);\n    R1(e, a, b, c, d, 16);\n    R1(d, e, a, b, c, 17);\n    R1(c, d, e, a, b, 18);\n    R1(b, c, d, e, a, 19);\n    for (i = 20; i < 40; i += 5) {\n        R2(a, b, c, d, e, 0 + i);\n        R2(e, a, b, c, d, 1 + i);\n        R2(d, e, a, b, c, 2 + i);\n        R2(c, d, e, a, b, 3 + i);\n        R2(b, c, d, e, a, 4 + i);\n    }\n    for (; i < 60; i += 5) {\n        R3(a, b, c, d, e, 0 + i);\n        R3(e, a, b, c, d, 1 + i);\n        R3(d, e, a, b, c, 2 + i);\n        R3(c, d, e, a, b, 3 + i);\n        R3(b, c, d, e, a, 4 + i);\n    }\n    for (; i < 80; i += 5) {\n        R4(a, b, c, d, e, 0 + i);\n        R4(e, a, b, c, d, 1 + i);\n        R4(d, e, a, b, c, 2 + i);\n        R4(c, d, e, a, b, 3 + i);\n        R4(b, c, d, e, a, 4 + i);\n    }\n#endif\n    state[0] += a;\n    state[1] += b;\n    state[2] += c;\n    state[3] += d;\n    state[4] += e;\n}']