mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-28 17:51:05 +00:00
avcodec/eatgq: Check init_get_bits8() for failure
Fixes CID1322315 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
66a7bc0010
commit
c447ab0e74
@ -157,7 +157,10 @@ static int tgq_decode_mb(TgqContext *s, AVFrame *frame, int mb_y, int mb_x)
|
|||||||
mode = bytestream2_get_byte(&s->gb);
|
mode = bytestream2_get_byte(&s->gb);
|
||||||
if (mode > 12) {
|
if (mode > 12) {
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
init_get_bits8(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode));
|
int ret = init_get_bits8(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode));
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
tgq_decode_block(s, s->block[i], &gb);
|
tgq_decode_block(s, s->block[i], &gb);
|
||||||
tgq_idct_put_mb(s, s->block, frame, mb_x, mb_y);
|
tgq_idct_put_mb(s, s->block, frame, mb_x, mb_y);
|
||||||
|
Loading…
Reference in New Issue
Block a user