From patchwork Wed May 10 16:37:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 3641 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp299145vsd; Wed, 10 May 2017 09:38:17 -0700 (PDT) X-Received: by 10.223.135.216 with SMTP id c24mr4398558wrc.109.1494434297370; Wed, 10 May 2017 09:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494434297; cv=none; d=google.com; s=arc-20160816; b=Xdy/ssiq28PiQ9F8i3BKJq7T51ZIgVdijoKxrhinAhxcDwjwpQ/OppKvVchdd+N8JJ 45Tt5dEz62u0Jyr5tJ6nNCbkK0eEhnhalEXkE4NrNzcWeL1P0Rq3Hi5SQLpvaNA9Pdmc KRUqe6ld8TeEUwxcUI4UhKh1nlskAqpHn7lMUyUgXTNzibSgkc41sJvTkfMQ6o2uc9K/ ZnTnhvpAXZbpUNIubtdkyoNZrnD065+wWVSY2xCVWOMn1TjO2CsN9yZJSoTne6OzkGCG 8/oZv+xsnq5NubmQmBhi45gfmu/kLX0EmqunhXUGNohkN8kCP1qaJgbcd+JIgS9UwmKV Ui4w== 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=cfVZQf95Guqw/5i0f/2yL5n5yoCRZkU8jhDwEgOEBVk=; b=x7Z+YTIWG3xe+VIQP6zwz1lXZolkknRb+b1n16d+ZJcCB5WNaQ0s3ddIEZRoDIJSih liu3TgoYAPzo08qoCLeqo1FTDM/2HdAqzcHM978I2u9XhO+5BiTZtChrQuZjTBjFayEA B3JJOS3Wn7JVtCuFK6xzkNTiiM4TMqcvwntwYB9aRvUwNtiY8Y12Zlvwx9AZXRe3tc/7 M7brjyLeBh8+7e3ddr2z/voskhbqz+/JYu8s9pApCCrSasTtleUXAowlS8UMHoA0yLXc y7HtsbC8eotOhZ5WxDEKazYkH9+4eItY+yozQPv7Ch8s7Ktc4qyw5hPzCTex97sFn/z5 zDLQ== 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 n6si3994106wrn.211.2017.05.10.09.38.16; Wed, 10 May 2017 09:38:17 -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 61A0D6891FB; Wed, 10 May 2017 19:38:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 17F7B6891E9 for ; Wed, 10 May 2017 19:37:56 +0300 (EEST) Received: from [172.31.218.36] (helo=vie01a-dmta-pe02-3.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1d8Uck-0003fs-QG for ffmpeg-devel@ffmpeg.org; Wed, 10 May 2017 18:38:02 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1d8Uce-00052P-LB for ffmpeg-devel@ffmpeg.org; Wed, 10 May 2017 18:37:56 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Jgds1v0170S5wYM01gdtqW; Wed, 10 May 2017 18:37:53 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 10 May 2017 18:37:50 +0200 Message-Id: <20170510163750.19352-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170510163750.19352-1-michael@niedermayer.cc> References: <20170510163750.19352-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/webp: Fixes null pointer dereference 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: 1470/clusterfuzz-testcase-minimized-5404421666111488 Fixes: 1472/clusterfuzz-testcase-minimized-5677426430443520 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 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) {