From patchwork Sat Jan 13 23:39:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 7279 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp1167398jaa; Sat, 13 Jan 2018 15:40:12 -0800 (PST) X-Google-Smtp-Source: ACJfBotBGSp/oKTNruY40tM6SokvXzX5z5prV/DvO+He9qAcQt5UsKchx0Le9owQ0ep9/2TMM4wC X-Received: by 10.28.107.5 with SMTP id g5mr7325854wmc.78.1515886812123; Sat, 13 Jan 2018 15:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515886812; cv=none; d=google.com; s=arc-20160816; b=AachrWsK6d8XN+wPGcFLAAm5ZXZkCXEaF7jgsiAGS4EmrnU6wGiX2lYW6pmm7inHqU SoUj42KJKEjGpq0uOWIh6Cbpvb3FS7RiIl1qz1GTkmMbgk+KPlGXVcHmVWxdbOkAk0QF qofryd73utm73qiEJnyKSjngGVzXPpIXqXFqo5BId7Gdb6502mWU+WP2j7z/Im8H7Koy mPkOgZ7ovmJL63QPBMN2p1lWvRa9dLX6frbAqaHxWjOgXAn6p+0gCAX+81EBhBYvlKYm XlwSzM+bvs50IGu4u6e1fLGMjth+riXKW2JRwnjA151MwcuZpjcPUZlk+13z08EHbPTJ AYdQ== 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=DMfhDHsg/YH2ldjTS4BPVNdfD6RIX1jYsRqBuFUmS4o=; b=mcIUkf9kEKNLLd9ySSEfv4OvNC43uvbozX1HYrKdQrAq5oYcqdLZrynY/Td9bkh7Qk fjE/ojTG9gS5rApaT+xERuLal03b7QNA7tOtmKsna8EIdj/FFOfn/CEOi0p+7X0RMSqE Q//N20+HTyJiefoZwZiWmb4J5FN+mAXavJes1P+IQei7V+GG8CMnHjtMZD1WljMyI4uY L0v9iMms/hxo/xRa1N/9LcjdRJ/Odc7knmrumWrutJDkEZ88OEGq74sibdDi0WBX82BT aOwbsOTd0rFTYej/PwaklGo5s+LcIutZJ8ogQAVuS6X7EKxuZaTAfZI6EDqNtoEGyXkG FSvA== 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 b88si13889946wrd.134.2018.01.13.15.40.11; Sat, 13 Jan 2018 15:40:12 -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 E4FD4689A5A; Sun, 14 Jan 2018 01:40:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe02-2.mx.upcmail.net (vie01a-qmta-pe02-2.mx.upcmail.net [62.179.121.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 662E9689BE6 for ; Sun, 14 Jan 2018 01:39:53 +0200 (EET) Received: from [172.31.218.54] (helo=vie01a-dmta-pe08-3.mx.upcmail.net) by vie01a-pqmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1eaVP0-0004PA-8e for ffmpeg-devel@ffmpeg.org; Sun, 14 Jan 2018 00:39:54 +0100 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1eaVOv-0000MT-2K for ffmpeg-devel@ffmpeg.org; Sun, 14 Jan 2018 00:39:49 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id xzfi1w00l0S5wYM01zfjx6; Sun, 14 Jan 2018 00:39:44 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 14 Jan 2018 00:39:39 +0100 Message-Id: <20180113233941.9407-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.15.1 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/ac3dec_fixed: Fix integer overflow in scale_coefs() 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: 2147483520 + 128 cannot be represented in type 'int' Fixes: 4800/clusterfuzz-testcase-minimized-6110372403609600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ac3dec_fixed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c index 9a6d7a08b1..bd66175d50 100644 --- a/libavcodec/ac3dec_fixed.c +++ b/libavcodec/ac3dec_fixed.c @@ -64,8 +64,8 @@ static void scale_coefs ( int dynrng, int len) { - int i, shift, round; - unsigned mul; + int i, shift; + unsigned mul, round; int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7; mul = (dynrng & 0x1f) + 0x20;