[FFmpeg-cvslog] mpegvideo_parser: fix buffer access beyond end

Wolfram Gloger git at videolan.org
Wed Dec 5 20:30:08 CET 2012


ffmpeg | branch: master | Wolfram Gloger <wmglo at dent.med.uni-muenchen.de> | Wed Dec  5 19:26:12 2012 +0100| [928346091a2eaa3cda72bf348d29712afee0f73a] | committer: Michael Niedermayer

mpegvideo_parser: fix buffer access beyond end

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=928346091a2eaa3cda72bf348d29712afee0f73a
---

 libavcodec/mpegvideo_parser.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index c112a94..35a9160 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;



More information about the ffmpeg-cvslog mailing list