aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorWolfram Gloger <wmglo@dent.med.uni-muenchen.de>2012-12-05 19:26:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-05 20:29:18 +0100
commit928346091a2eaa3cda72bf348d29712afee0f73a (patch)
treed1431743641f69bb176b4e75e8b47d31492cf99a /libavcodec
parent58df8befda61c8e984a3f55f7f5abc454055f893 (diff)
downloadffmpeg-928346091a2eaa3cda72bf348d29712afee0f73a.tar.gz
mpegvideo_parser: fix buffer access beyond end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo_parser.c1
1 files changed, 1 insertions, 0 deletions
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;