From 928346091a2eaa3cda72bf348d29712afee0f73a Mon Sep 17 00:00:00 2001 From: Wolfram Gloger Date: Wed, 5 Dec 2012 19:26:12 +0100 Subject: [PATCH] mpegvideo_parser: fix buffer access beyond end Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index c112a94841..35a91604d2 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -56,6 +56,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, case PICTURE_START_CODE: if (bytes_left >= 2) { s->pict_type = (buf[1] >> 3) & 7; + if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3); } break;