Browse code

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>

Andreas Cadhalpun authored on 2015/11/15 06:46:46
Showing 1 changed files
... ...
@@ -815,6 +815,7 @@ static void clear_context(MpegEncContext *s)
815 815
 
816 816
     s->parse_context.buffer = NULL;
817 817
     s->parse_context.buffer_size = 0;
818
+    s->parse_context.overread = 0;
818 819
     s->bitstream_buffer = NULL;
819 820
     s->allocated_bitstream_buffer_size = 0;
820 821
     s->picture          = NULL;