avcodec/bitstream: assert that no integer overflow happened when writing codes in build_table()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/54/head
Michael Niedermayer 11 years ago
parent 35fe88bb51
commit 622d463000
  1. 1
      libavcodec/bitstream.c

@ -232,6 +232,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
/* note: realloc has been done, so reload tables */
table = &vlc->table[table_index];
table[j][0] = index; //code
av_assert0(table[j][0] == index);
i = k-1;
}
}

Loading…
Cancel
Save