From patchwork Fri Sep 1 17:56:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 4943 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp862031jao; Fri, 1 Sep 2017 10:56:24 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6oqiLxb5kB6NwxvGWQf31syc00GV5pgBk8x9jqClCh7e/neY3IRLF5U/HVCAMkGsqkC2L7 X-Received: by 10.28.139.72 with SMTP id n69mr912391wmd.15.1504288584107; Fri, 01 Sep 2017 10:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504288584; cv=none; d=google.com; s=arc-20160816; b=LoVaz1//7T7GcqaUNTDRCdS4H8aNsnrVYLqF/1zuzk31MdG3HU7tXDYejYVn+8fAds MKq8qADYJ6EW5Hnn6NnLiGIp7my4V5dVSS/6QwZypkISpr7v0ODVlUuUjQ2Avyz/OMtW mNVF+K56ZEI1RRogb7j21nT9hmiy/3fgS58Lft7wVAQSD3lM4G4bzGzZn/Vy5G/Fd5IZ c+D8CGba9js82+yf8v+7U2j/zq8Oc3TYLxZffHuJyUsLfEzc75C+N1GAX2dRIfd6lcJu nR87BUUKIrRlL+yUxBagcnwi8gshijm8RczW1B2bAwKyIUCBs3iC9Yu+4HHAYmOrugFa faXQ== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=VjnA6mYpJmFlPbhsdqHplSv6CwkafeNqHnMz+5JV+vw=; b=mi1uVi6vJ+8wKiyzmY8jYBcbEu3+yIxvLdDIoTcDUl3CbFLF0EaGWUMYzTfOmgflHF +UrClyJdb+NELM7mgfjG2geg2vZ4J6vEU5Ho9WcICZU/2d5xhnjg5k00P6BQn0l6OVX2 X6qPGpbwfiR6T+425EFYaN6s9z0wn8vseZRNZnRdeyr5KUPToaJWaDCg3KnfZcyn1Pav LtZxf1hAKMAEckHE+SEsAZ25kegmFdRE2TwmJ9XzEjIuboVssvkbszXrjDE3ipdmUdrW CrO+Ho3cb+KWzIuuhk8krLWlZFGZdGuNqQ5Tbu+ODfUd8Bq4usyk5dxefmDXUvKK/sfd h5oQ== 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 6si474246wmn.91.2017.09.01.10.56.23; Fri, 01 Sep 2017 10:56:24 -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 2F4C268A204; Fri, 1 Sep 2017 20:56:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-2.mx.upcmail.net (vie01a-dmta-pe03-2.mx.upcmail.net [62.179.121.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B39F168A1B4 for ; Fri, 1 Sep 2017 20:56:13 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dnqAw-0007QY-7g for ffmpeg-devel@ffmpeg.org; Fri, 01 Sep 2017 19:56:14 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id 4HwC1w01k0S5wYM01HwEh4; Fri, 01 Sep 2017 19:56:14 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 1 Sep 2017 19:56:10 +0200 Message-Id: <20170901175612.18603-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.14.1 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/diracdec: Fix integer overflow in INTRA_DC_PRED() 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: runtime error: signed integer overflow: 1168175789 + 1168178473 cannot be represented in type 'int' Fixes: 3081/clusterfuzz-testcase-minimized-4807564879462400 Fixes: 2844/clusterfuzz-testcase-minimized-5561715838156800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 0aee08f9e1..f2aed6057d 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -586,7 +586,7 @@ static inline void codeblock(DiracContext *s, SubBand *b, } \ INTRA_DC_PRED(8, int16_t) -INTRA_DC_PRED(10, int32_t) +INTRA_DC_PRED(10, uint32_t) /** * Dirac Specification ->