aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-10 18:37:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-23 13:15:17 +0200
commit7735b8e565f16ece7ad46a59a7bb35ad60998c13 (patch)
tree435e436208331d50d6504cf1293ed9e331bd4140
parentea8984650c659ec387a2e154adab7d4d2cdc67db (diff)
downloadffmpeg-7735b8e565f16ece7ad46a59a7bb35ad60998c13.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>
-rw-r--r--libavcodec/webp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index 29bef3db24..44be965229 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -1334,6 +1334,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) {