From patchwork Fri Oct 27 00:23:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 5710 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp112383jah; Thu, 26 Oct 2017 17:23:36 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RNv2hj2fULTUIPYbU5DMqce9VztxPgmjXDtqUwjHEdjDM1qReROh89+2UQaI5cbeoxZO3a X-Received: by 10.223.128.170 with SMTP id 39mr6491576wrl.236.1509063816076; Thu, 26 Oct 2017 17:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509063816; cv=none; d=google.com; s=arc-20160816; b=p1pCQAHOEkX/LalmmD0XWfj2YMxeJ/XUGgyu+e5rRdIfD+vP3HrLt1LJD9K58VAtHd YbShOhiTUCJ09wHlpk6/M4eMoo5l+XPGNrXNvbvYtTEheyupybcvCfc1iTyVm8XH/LKi baaY6jqXc3I7+uccg+noQ0LuWjbafP0k2TRuH+hedbXquVYrtu3BM9v4oASO3h9JHuvi iAvW3V3yuFWaZNEdJ/gVKJzjASNgcYsMWNAXOqN/WsUjTQmWVlrzo9K/ZBhOnViSz1lA 5owoIC2fuc3OVbx6xk1sbi5JXpuKZt/5gGFVgnjjGERa8i54UlrLHqsREGl2MKIX6k3D 0cOg== 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=02e5aIoMkJdZ26+S0qa7an/VwJQKg/W2JAb0zo5myC8=; b=g4L1WP2iJ63zYKPXt1H9b+hT4XEwIfxSy2IfBRMr4tpXIl08afjK7SpJlxmMRJqeT1 g7r7wHE1JZ0e+NuADRJa95rt7sVQ2gXiY0pD6MlN8H7ZzqJkLWa3nFNJBgwgcIz6WcWb Ei4fGfA/F5Yhji9tu7FrwJ6Pbo5LRlGser8El355Tze3OflVcGGlha+AWJYzjwvMN2wL ezz+7WWQA2REBjwNvsz89x0ywJzDqESXewUyPtCHTEJc6nP/ZpVE1Olh4jhqsp6kTApR fPhra9Liz9PBG90Ril1cpKOYN0l8f4pkMVULMUZeu0vMPe4wW9yulYpIOkZV95/6WEBa 7XYw== 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 f47si4666930wra.498.2017.10.26.17.23.35; Thu, 26 Oct 2017 17:23:36 -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 4562668A234; Fri, 27 Oct 2017 03:23:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D78D068A20E for ; Fri, 27 Oct 2017 03:23:19 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1e7sQp-0004mC-Q3 for ffmpeg-devel@ffmpeg.org; Fri, 27 Oct 2017 02:23:27 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id SQPP1w0150S5wYM01QPQyU; Fri, 27 Oct 2017 02:23:24 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 27 Oct 2017 02:23:21 +0200 Message-Id: <20171027002321.12800-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171027002321.12800-1-michael@niedermayer.cc> References: <20171027002321.12800-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/aacdec_fixed: Fix integer overflow in apply_dependent_coupling_fixed() 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: 623487 * 536870912 cannot be represented in type 'int' Fixes: 3594/clusterfuzz-testcase-minimized-4650622935629824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/aacdec_fixed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index 5e9249ceea..d802f3834f 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -394,7 +394,7 @@ static void apply_dependent_coupling_fixed(AACContext *ac, for (k = offsets[i]; k < offsets[i + 1]; k++) { tmp = (int)(((int64_t)src[group * 128 + k] * c + \ (int64_t)0x1000000000) >> 37); - dest[group * 128 + k] += tmp * (1 << shift); + dest[group * 128 + k] += tmp * (1U << shift); } } }