Browse Source

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>
tags/n4.1
Michael Niedermayer 7 years ago
parent
commit
284dde24da
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/vp8_parser.c

+ 3
- 0
libavcodec/vp8_parser.c View File

@@ -28,6 +28,9 @@ static int parse(AVCodecParserContext *s,
unsigned int frame_type;
unsigned int profile;

*poutbuf = buf;
*poutbuf_size = buf_size;

if (buf_size < 3)
return buf_size;



Loading…
Cancel
Save