mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 02:04:58 +00:00
Add a check to vp6_parse_coeff_huffman to ensure it does not overread the input buffer.
Originally committed as revision 19349 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7576516a7e
commit
ad92108694
@ -372,6 +372,8 @@ static void vp6_parse_coeff_huffman(VP56Context *s)
|
|||||||
if (coeff_idx)
|
if (coeff_idx)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
if (get_bits_count(&s->gb) >= s->gb.size_in_bits)
|
||||||
|
return;
|
||||||
coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);
|
coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);
|
||||||
if (coeff == 0) {
|
if (coeff == 0) {
|
||||||
if (coeff_idx) {
|
if (coeff_idx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user