[FFmpeg-devel] [PATCH] mpegvideo: clear overread in clear_context

Andreas Cadhalpun andreas.cadhalpun at gmail.com
Sat Nov 14 23:00:55 CET 2015


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

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 libavcodec/mpegvideo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 69e0595..60e19ff 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -824,6 +824,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;
-- 
2.6.2


More information about the ffmpeg-devel mailing list