mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
35fe88bb51
commit
622d463000
|
@ -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 */
|
/* note: realloc has been done, so reload tables */
|
||||||
table = &vlc->table[table_index];
|
table = &vlc->table[table_index];
|
||||||
table[j][0] = index; //code
|
table[j][0] = index; //code
|
||||||
|
av_assert0(table[j][0] == index);
|
||||||
i = k-1;
|
i = k-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue