libavcodec/truemotion2.c:162: error: Buffer Overrun L3
  Offset: [1, +oo] Size: [0, 32768] by call to `init_vlc_sparse`.

libavcodec/truemotion2.c:126:5: Assignment
124.     huff.min_bits = get_bits(&ctx->gb, 5);
125.     huff.nodes = get_bits_long(&ctx->gb, 17);
126.     huff.num = 0;
         ^
127. 
128.     /* check for correct codes parameters */

libavcodec/truemotion2.c:149:8: Call
147.     huff.lens = av_mallocz(huff.max_num * sizeof(int));
148. 
149.     if(tm2_read_tree(ctx, 0, 0, &huff) == -1)
            ^
150.         res = -1;
151. 

libavcodec/truemotion2.c:88:1: Parameter `huff->max_num`
  86. } TM2Huff;
  87. 
  88. static int tm2_read_tree(TM2Context *ctx, uint32_t prefix, int length, TM2Huff *huff)
      ^
  89. {
  90.     if(length > huff->max_bits) {

libavcodec/truemotion2.c:162:15: Call
160.         int i;
161. 
162.         res = init_vlc(&code->vlc, huff.max_bits, huff.max_num,
                   ^
163.                     huff.lens, sizeof(int), sizeof(int),
164.                     huff.bits, sizeof(uint32_t), sizeof(uint32_t), 0);

libavcodec/bitstream.c:272:1: Parameter `nb_codes`
  270.    with av_free_static(), 0 if free_vlc() will be used.
  271. */
  272. int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
       ^
  273.              const void *bits, int bits_wrap, int bits_size,
  274.              const void *codes, int codes_wrap, int codes_size,

libavcodec/bitstream.c:278:17: Array declaration
  276.              int flags)
  277. {
  278.     VLCcode buf[nb_codes];
                       ^
  279.     int i, j;
  280. 

libavcodec/bitstream.c:322:9: Call
  320.     nb_codes = j;
  321. 
  322.     if (build_table(vlc, nb_bits, nb_codes, buf, flags) < 0) {
               ^
  323.         av_freep(&vlc->table);
  324.         return -1;

libavcodec/bitstream.c:155:1: <Offset trace>
153.  *                       Sorting by VLCcode.code is sufficient, though not necessary.
154.  */
155. static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
     ^
156.                        VLCcode *codes, int flags)
157. {

libavcodec/bitstream.c:155:1: Parameter `nb_codes`
    153.  *                       Sorting by VLCcode.code is sufficient, though not necessary.
    154.  */
    155. static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
         ^
    156.                        VLCcode *codes, int flags)
    157. {

libavcodec/bitstream.c:155:1: <Length trace>
153.  *                       Sorting by VLCcode.code is sufficient, though not necessary.
154.  */
155. static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
     ^
156.                        VLCcode *codes, int flags)
157. {

libavcodec/bitstream.c:155:1: Parameter `*codes`
    153.  *                       Sorting by VLCcode.code is sufficient, though not necessary.
    154.  */
    155. static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
         ^
    156.                        VLCcode *codes, int flags)
    157. {

libavcodec/bitstream.c:216:21: Array access: Offset: [1, +oo] Size: [0, 32768] by call to `init_vlc_sparse` 
    214.             codes[i].code = code << table_nb_bits;
    215.             for (k = i+1; k < nb_codes; k++) {
    216.                 n = codes[k].bits - table_nb_bits;
                             ^
    217.                 if (n <= 0)
    218.                     break;
