libavcodec/dxtory.c:308: error: Buffer Overrun L2
  Offset: [0, 7] Size: 3 by call to `decode_sym`.

libavcodec/dxtory.c:297:1: Array declaration
295. }
296. 
297. static int dx2_decode_slice_rgb(GetBitContext *gb, int width, int height,
     ^
298.                                 uint8_t *dst, int stride)
299. {

libavcodec/dxtory.c:308:30: Call
306.     for (y = 0; y < height; y++) {
307.         for (x = 0; x < width; x++) {
308.             dst[x * 3 + 0] = decode_sym(gb, lru[0]);
                                  ^
309.             dst[x * 3 + 1] = decode_sym(gb, lru[1]);
310.             dst[x * 3 + 2] = decode_sym(gb, lru[2]);

libavcodec/dxtory.c:180:9: <Offset trace>
178.     uint8_t c, val;
179. 
180.     c = get_unary(gb, 0, 8);
             ^
181.     if (!c) {
182.         val = get_bits(gb, 8);

libavcodec/dxtory.c:180:9: Call
  178.     uint8_t c, val;
  179. 
  180.     c = get_unary(gb, 0, 8);
               ^
  181.     if (!c) {
  182.         val = get_bits(gb, 8);

libavcodec/unary.h:33:1: Parameter `len`
    31.  * @return Unary length/index
    32.  */
    33. static inline int get_unary(GetBitContext *gb, int stop, int len)
        ^
    34. {
    35.     int i;

libavcodec/unary.h:38:5: Assignment
    36. 
    37.     for(i = 0; i < len && get_bits1(gb) != stop; i++);
    38.     return i;
            ^
    39. }
    40. 

libavcodec/dxtory.c:180:5: Assignment
  178.     uint8_t c, val;
  179. 
  180.     c = get_unary(gb, 0, 8);
           ^
  181.     if (!c) {
  182.         val = get_bits(gb, 8);

libavcodec/dxtory.c:176:1: <Length trace>
174. const uint8_t def_lru_565[8] = { 0x00, 0x08, 0x10, 0x20, 0x30, 0x3F };
175. 
176. static inline uint8_t decode_sym(GetBitContext *gb, uint8_t lru[8])
     ^
177. {
178.     uint8_t c, val;

libavcodec/dxtory.c:176:1: Parameter `*lru`
  174. const uint8_t def_lru_565[8] = { 0x00, 0x08, 0x10, 0x20, 0x30, 0x3F };
  175. 
  176. static inline uint8_t decode_sym(GetBitContext *gb, uint8_t lru[8])
       ^
  177. {
  178.     uint8_t c, val;

libavcodec/dxtory.c:185:15: Array access: Offset: [0, 7] Size: 3 by call to `decode_sym` 
  183.         memmove(lru + 1, lru, sizeof(*lru) * (8 - 1));
  184.     } else {
  185.         val = lru[c - 1];
                     ^
  186.         memmove(lru + 1, lru, sizeof(*lru) * (c - 1));
  187.     }

static inline uint8_t decode_sym(GetBitContext *gb, uint8_t lru[8])
{
    uint8_t c, val;
    c = get_unary(gb, 0, 8);
    if (!c) {
        val = get_bits(gb, 8);
        memmove(lru + 1, lru, sizeof(*lru) * (8 - 1));
    } else {
        val = lru[c - 1];
        memmove(lru + 1, lru, sizeof(*lru) * (c - 1));
    }
    lru[0] = val;
    return val;
}
['static int dx2_decode_slice_rgb(GetBitContext *gb, int width, int height,\n                                uint8_t *dst, int stride)\n{\n    int x, y, i;\n    uint8_t lru[3][8];\n    for (i = 0; i < 3; i++)\n        memcpy(lru[i], def_lru, 8 * sizeof(*def_lru));\n    for (y = 0; y < height; y++) {\n        for (x = 0; x < width; x++) {\n            dst[x * 3 + 0] = decode_sym(gb, lru[0]);\n            dst[x * 3 + 1] = decode_sym(gb, lru[1]);\n            dst[x * 3 + 2] = decode_sym(gb, lru[2]);\n        }\n        dst += stride;\n    }\n    return 0;\n}', 'static inline uint8_t decode_sym(GetBitContext *gb, uint8_t lru[8])\n{\n    uint8_t c, val;\n    c = get_unary(gb, 0, 8);\n    if (!c) {\n        val = get_bits(gb, 8);\n        memmove(lru + 1, lru, sizeof(*lru) * (8 - 1));\n    } else {\n        val = lru[c - 1];\n        memmove(lru + 1, lru, sizeof(*lru) * (c - 1));\n    }\n    lru[0] = val;\n    return val;\n}', 'static inline int get_unary(GetBitContext *gb, int stop, int len)\n{\n    int i;\n    for(i = 0; i < len && get_bits1(gb) != stop; i++);\n    return i;\n}']