diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-06 12:01:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-16 19:02:12 +0200 |
commit | fc92ca5b8e3bf5110f89f37c5abf213ce75f5266 (patch) | |
tree | 46bd909d7e84f1ef53753bc699873c2e973546d3 /libavcodec | |
parent | 6d992a51c75aafba6e21bff95cddae9d717bc7e3 (diff) | |
download | ffmpeg-fc92ca5b8e3bf5110f89f37c5abf213ce75f5266.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp8_parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vp8_parser.c b/libavcodec/vp8_parser.c index 609f5077d1..e2d91b271f 100644 --- a/libavcodec/vp8_parser.c +++ b/libavcodec/vp8_parser.c @@ -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; |