Browse code

avcodec/vp8_parser: Do not leave data/size uninitialized

This is identical to what the VP9 parser does

Fixes: 9215/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-5768227253649408
Fixes: out of memory access

This may also fix oss fuzz issue 9212

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 284dde24dab30225ed3e233b0e5908d67d7e13e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2018/07/06 19:01:46
Showing 1 changed files
... ...
@@ -28,6 +28,9 @@ static int parse(AVCodecParserContext *s,
28 28
     unsigned int frame_type;
29 29
     unsigned int profile;
30 30
 
31
+    *poutbuf      = buf;
32
+    *poutbuf_size = buf_size;
33
+
31 34
     if (buf_size < 3)
32 35
         return buf_size;
33 36