aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-11-14 22:46:46 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-11-26 01:37:56 +0100
commitd52df5cffa18860ae73bb5410c4430b40f25e4d6 (patch)
tree37b84d7e0bf892fec114c2b3e13d8a870d3c30e2
parentb6a4abc7705f3bfea14f468ed5d45fcd88873be5 (diff)
downloadffmpeg-d52df5cffa18860ae73bb5410c4430b40f25e4d6.tar.gz
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@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit 6a69a175e7b5c5393528ed0f5753e41573fa0df2) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavcodec/mpegvideo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index ade85e97ac..53d1873a94 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1316,6 +1316,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;