From patchwork Fri Jan 26 01:56:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 7417 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.156.27 with SMTP id q27csp90003jak; Thu, 25 Jan 2018 17:56:48 -0800 (PST) X-Google-Smtp-Source: AH8x225vwt6EF647Wx18Z1SttsSn7xmPk8EP24nYn4AwrhLcTLWsT2ubl9hyqMkmjTbAgrJaDd9r X-Received: by 10.223.176.232 with SMTP id j37mr340132wra.252.1516931808835; Thu, 25 Jan 2018 17:56:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516931808; cv=none; d=google.com; s=arc-20160816; b=LA4wY+dqIRffCZdOsJKzmzAnr12JwmeJS4XlC7TearEftCgI37+MuF0dr4hr0BHvKx S9yrSII1jQIXnQRspi8EOZc/XfvPXQ0R00AGmsS+/lhwdT6OXFnt8tmLJEOFy35Mv6Zo O1JMbncGA5Mtzqeww8sY2vMqxR5DIvux9+ckXAUbcSJM0W7Of9cxh+wppgwH0fn2Xe8C EUnVliYYPwD4eEURsX/Q/Buli3gZcKgDpZ9ZM/beOUt/vGVLCUevJ8wdljRZ5Q7Vvf7c vGCtFZ9qMl7riTeGy6O01Gf5Y4sF+PPZ48HBdrczfiFcQFbETv83NBQlGjb948Romfls z0AA== 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=1syuoScGNaMHcFrK/obwgEk9aS5z3Sf47N6KaeW5sC8=; b=MYZaZqmSP/Dcu7qZ/TzG679oUHOyG/X7xxGelxgGDuWvcGxc4utWahabS6ljEZuttc GbAwxeJ9TpyFcVzZmmzEOABwnSmrZoPrE10gR0EcPGVWmR5Oj98GTThkYqbR8CfvKO/i EaDS0+PFWDHr9dcBycM8YFPwHZhJiUPF6EF2vX8/pKN4lq6MJ3R61wEMRp1oCdNIbk15 z53IS6sBVG6eKdPjpJTM5m/EFkeeACCt3R1ijJivtmXyMqspEEEuU6gUk3I9CkeSOoR/ Nxw30s3JOk04Qxymocndb53GWQ1W+R2aSjbsR0J1QN+7LNjx+QH1bBWKImk5W74rjiQ+ SLow== 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 n4si4632220wrh.371.2018.01.25.17.56.45; Thu, 25 Jan 2018 17:56:48 -0800 (PST) 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 01E2E6882CE; Fri, 26 Jan 2018 03:56:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-3.mx.upcmail.net (vie01a-dmta-pe04-3.mx.upcmail.net [62.179.121.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 52029680B9B for ; Fri, 26 Jan 2018 03:56:34 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1eetFs-00054C-VL for ffmpeg-devel@ffmpeg.org; Fri, 26 Jan 2018 02:56:36 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id 2pwY1x00t0S5wYM01pwZqd; Fri, 26 Jan 2018 02:56:33 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 26 Jan 2018 02:56:30 +0100 Message-Id: <20180126015630.3998-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180126015630.3998-1-michael@niedermayer.cc> References: <20180126015630.3998-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/indeo5: Do not leave frame_type set to an invalid value 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: null pointer dereference Fixes: 5264/clusterfuzz-testcase-minimized-4621956621008896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/indeo5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index 81b4514038..b39cffd9a9 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -324,6 +324,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx) ctx->frame_type = get_bits(&ctx->gb, 3); if (ctx->frame_type >= 5) { av_log(avctx, AV_LOG_ERROR, "Invalid frame type: %d \n", ctx->frame_type); + ctx->frame_type = FRAMETYPE_INTRA; return AVERROR_INVALIDDATA; }