[FFmpeg-cvslog] mpegvideo: clear overread in clear_context

Andreas Cadhalpun git at videolan.org
Thu Nov 26 01:46:58 CET 2015


ffmpeg | branch: release/2.6 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sat Nov 14 22:46:46 2015 +0100| [b7d1bbe139f49ae09c2dd5329a3c92f732648119] | committer: Andreas Cadhalpun

mpegvideo: clear overread in clear_context

Otherwise the h263p decoder can try to copy overread bytes, even though
buffer is NULL.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
(cherry picked from commit 6a69a175e7b5c5393528ed0f5753e41573fa0df2)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

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

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4d67e7e..949aeba 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1318,6 +1318,7 @@ static void clear_context(MpegEncContext *s)
 
     s->parse_context.buffer = NULL;
     s->parse_context.buffer_size = 0;
+    s->parse_context.overread = 0;
     s->bitstream_buffer = NULL;
     s->allocated_bitstream_buffer_size = 0;
     s->picture          = NULL;



More information about the ffmpeg-cvslog mailing list