mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/mpeg12dec: Check for overread in mpeg_decode_slice()
This is needed in case the checked bitstream reader is disabled Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d82eccea2b
commit
76b5e99ce9
@ -1846,6 +1846,8 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
|
||||
}
|
||||
}
|
||||
eos: // end of slice
|
||||
if (get_bits_left(&s->gb) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
*buf += (get_bits_count(&s->gb)-1)/8;
|
||||
av_dlog(s, "y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user