mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
mpegvideo_parser: fix buffer access beyond end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
58df8befda
commit
928346091a
@ -56,6 +56,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
|
|||||||
case PICTURE_START_CODE:
|
case PICTURE_START_CODE:
|
||||||
if (bytes_left >= 2) {
|
if (bytes_left >= 2) {
|
||||||
s->pict_type = (buf[1] >> 3) & 7;
|
s->pict_type = (buf[1] >> 3) & 7;
|
||||||
|
if (bytes_left >= 4)
|
||||||
vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
|
vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user