diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-10 18:37:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-18 16:05:23 +0200 |
commit | f88fd9027c49f20ce0ff0b04658322314fac605e (patch) | |
tree | 7c40a8299a06ea2afa4dcf33f0c6adadbb6ac730 /libavcodec/webp.c | |
parent | 228093ec9368dba09a33c1a3f15b5966b1d871e7 (diff) | |
download | ffmpeg-f88fd9027c49f20ce0ff0b04658322314fac605e.tar.gz |
avcodec/webp: Fixes null pointer dereference
Fixes: 1470/clusterfuzz-testcase-minimized-5404421666111488
Fixes: 1472/clusterfuzz-testcase-minimized-5677426430443520
Fixes: 1875/clusterfuzz-testcase-minimized-5536474562822144
Approved-by: BBB
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 67020711b7d45afa073ef671f755765035a64373)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/webp.c')
-rw-r--r-- | libavcodec/webp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 04d898ee7b..6aa0e4aed8 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1350,6 +1350,9 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p, if (ret < 0) return ret; + if (!*got_frame) + return AVERROR_INVALIDDATA; + update_canvas_size(avctx, avctx->width, avctx->height); if (s->has_alpha) { |