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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-23 01:32:49 +01:00
parent 35fe88bb51
commit 622d463000
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}