[FFmpeg-devel] [PATCH 2/2] avcodec/webp: Fixes null pointer dereference

Michael Niedermayer michael at niedermayer.cc
Wed May 10 19:37:50 EEST 2017


Fixes: 1470/clusterfuzz-testcase-minimized-5404421666111488
Fixes: 1472/clusterfuzz-testcase-minimized-5677426430443520

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/webp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index e0cd72d03a..1eebb8ccef 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -1351,6 +1351,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) {
-- 
2.11.0



More information about the ffmpeg-devel mailing list