libavcodec/huffyuvdec.c:197: error: Buffer Overrun L2
  Offset: [0, 257] (⇐ [0, 2] + [0, 255]) Size: 3 by call to `ff_huffyuv_generate_bits_table`.

libavcodec/huffyuvdec.c:186:1: Parameter `s->len[*]`
184. }
185. 
186. static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
     ^
187. {
188.     GetBitContext gb;

libavcodec/huffyuvdec.c:197:20: Call
195.         if ((ret = read_len_table(s->len[i], &gb)) < 0)
196.             return ret;
197.         if ((ret = ff_huffyuv_generate_bits_table(s->bits[i], s->len[i])) < 0)
                        ^
198.             return ret;
199.         ff_free_vlc(&s->vlc[i]);

libavcodec/huffyuv.c:45:14: <Offset trace>
43. 
44.     for (len = 32; len > 0; len--) {
45.         for (index = 0; index < 256; index++) {
                 ^
46.             if (len_table[index] == len)
47.                 dst[index] = bits++;

libavcodec/huffyuv.c:45:14: Assignment
  43. 
  44.     for (len = 32; len > 0; len--) {
  45.         for (index = 0; index < 256; index++) {
                   ^
  46.             if (len_table[index] == len)
  47.                 dst[index] = bits++;

libavcodec/huffyuv.c:39:1: <Length trace>
37. #include "huffyuv.h"
38. 
39. int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table)
    ^
40. {
41.     int len, index;

libavcodec/huffyuv.c:39:1: Parameter `*len_table`
  37. #include "huffyuv.h"
  38. 
  39. int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table)
      ^
  40. {
  41.     int len, index;

libavcodec/huffyuv.c:46:17: Array access: Offset: [0, 257] (⇐ [0, 2] + [0, 255]) Size: 3 by call to `ff_huffyuv_generate_bits_table` 
  44.     for (len = 32; len > 0; len--) {
  45.         for (index = 0; index < 256; index++) {
  46.             if (len_table[index] == len)
                      ^
  47.                 dst[index] = bits++;
  48.         }

int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table)
{
    int len, index;
    uint32_t bits = 0;
    for (len = 32; len > 0; len--) {
        for (index = 0; index < 256; index++) {
            if (len_table[index] == len)
                dst[index] = bits++;
        }
        if (bits & 1) {
            av_log(NULL, AV_LOG_ERROR, "Error generating huffman table\n");
            return -1;
        }
        bits >>= 1;
    }
    return 0;
}
['static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)\n{\n    GetBitContext gb;\n    int i, ret;\n    if ((ret = init_get_bits(&gb, src, length * 8)) < 0)\n        return ret;\n    for (i = 0; i < 3; i++) {\n        if ((ret = read_len_table(s->len[i], &gb)) < 0)\n            return ret;\n        if ((ret = ff_huffyuv_generate_bits_table(s->bits[i], s->len[i])) < 0)\n            return ret;\n        ff_free_vlc(&s->vlc[i]);\n        if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,\n                            s->bits[i], 4, 4, 0)) < 0)\n            return ret;\n    }\n    if ((ret = generate_joint_tables(s)) < 0)\n        return ret;\n    return (get_bits_count(&gb) + 7) / 8;\n}', 'int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table)\n{\n    int len, index;\n    uint32_t bits = 0;\n    for (len = 32; len > 0; len--) {\n        for (index = 0; index < 256; index++) {\n            if (len_table[index] == len)\n                dst[index] = bits++;\n        }\n        if (bits & 1) {\n            av_log(NULL, AV_LOG_ERROR, "Error generating huffman table\\n");\n            return -1;\n        }\n        bits >>= 1;\n    }\n    return 0;\n}']