[FFmpeg-devel] [PATCH 3/3] avcodec/webp: Update canvas size in vp8_lossy_decode_frame() as in vp8_lossless_decode_frame()

Michael Niedermayer michael at niedermayer.cc
Mon May 8 15:43:03 EEST 2017


Fixes: 1407/clusterfuzz-testcase-minimized-6044604124102656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
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 21e3bcfa0a..16c3ae2662 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -1351,6 +1351,9 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p,
     ret = ff_vp8_decode_frame(avctx, p, got_frame, &pkt);
     if (ret < 0)
         return ret;
+
+    update_canvas_size(avctx, avctx->width, avctx->height);
+
     if (s->has_alpha) {
         ret = vp8_lossy_decode_alpha(avctx, p, s->alpha_data,
                                      s->alpha_data_size);
-- 
2.11.0



More information about the ffmpeg-devel mailing list