Browse Source

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 6a69a175e7)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
tags/n2.8.3
Andreas Cadhalpun 10 years ago
parent
commit
6b0bc64f54
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/mpegvideo.c

+ 1
- 0
libavcodec/mpegvideo.c View File

@@ -815,6 +815,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;


Loading…
Cancel
Save