From patchwork Mon May 8 12:43:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 3617 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp829038vsd; Mon, 8 May 2017 05:43:35 -0700 (PDT) X-Received: by 10.223.172.48 with SMTP id v45mr44866288wrc.112.1494247414963; Mon, 08 May 2017 05:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494247414; cv=none; d=google.com; s=arc-20160816; b=HtASsVGr7RD+osbEeE907ah0uUnjDCGOGk/W9QY5Qf6hIJ23Cx/cxI2RoZKY/Ej6wB zyBX3oS5pmSTGueVO5yPfiEJ19ihRgE6fSm+gBVxHk/7W7EFiHKAwM75JF4LKJ4K57fV Y1dOURbZ7i6pNqLZuPAlNbeyvmHDLdUmRHQSfl/SJNvZ268jIxuLVQI5a/RFGMremJ9j +5bJtV0exwID/uoI6Axg2fB43IS1C0meKcvcis4kF2k434jk3o3HjrUENTx43KB6Igly zPdfs5YLI/fy7X9rE0MquWznK1/y3KEpkOCkFEDZeGcsE64jn+nQ1i6WQ3PrNOy6th89 7kIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=n/O+VE5UKtTzCO7jXp/V8BsBE0bBl1bVDN/X0UUvYbs=; b=lZ/z4Wn0tltjYg/juNr9YUIbgnNJ5pjEXodfeMqkUmZLk0qymv/KJQ4l7E7D6d8mfv 3aV2d/7O3xEkdTK/09zN8ASiOraLkn/CE/dfvBGn0YFvd1J7oqzTPWLm8ZQjjIUgeMrX YlbqRHL6y6J6NWltYA2Ft5wHxYZAaXBr4ODn8WJ2X7aNwJKKsg8eZkDkdHBNlyIYpZLQ JyeWcEh9wP3jCfBMZSaHw5p902sysMJzgz5uAhAsbdaECvb8gpoOb242wKAy274igBsj DZ2wvep///s5ZP1Wg7JofOr0ycdZ9y2QAKJUHmhQR6iGY7i4aH5hYPAX9IMPuhsTXWgj MJLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w67si920987wmf.98.2017.05.08.05.43.34; Mon, 08 May 2017 05:43:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EE0AA6882C2; Mon, 8 May 2017 15:43:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-1.mx.upcmail.net (vie01a-qmta-pe01-1.mx.upcmail.net [62.179.121.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F975680A4E for ; Mon, 8 May 2017 15:43:11 +0300 (EEST) Received: from [172.31.218.31] (helo=vie01a-dmta-pe01-1.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1d7i0T-0002Tc-4E for ffmpeg-devel@ffmpeg.org; Mon, 08 May 2017 14:43:17 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1d7i0N-0008CC-LJ for ffmpeg-devel@ffmpeg.org; Mon, 08 May 2017 14:43:11 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Hoj61v01N0S5wYM01oj7AS; Mon, 08 May 2017 14:43:07 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 8 May 2017 14:43:03 +0200 Message-Id: <20170508124303.12267-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170508124303.12267-1-michael@niedermayer.cc> References: <20170508124303.12267-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/webp: Update canvas size in vp8_lossy_decode_frame() as in vp8_lossless_decode_frame() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- 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);