From patchwork Sun Nov 5 20:20:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 5872 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp2195639jah; Sun, 5 Nov 2017 12:20:29 -0800 (PST) X-Google-Smtp-Source: ABhQp+ToGMaRkneyvouiLZUwccmKcRCCb6tia7JhlsOA6iCY+5v608kt8IhzAvjlFpjYD4BDTloc X-Received: by 10.28.12.75 with SMTP id 72mr3521559wmm.133.1509913229386; Sun, 05 Nov 2017 12:20:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509913229; cv=none; d=google.com; s=arc-20160816; b=bZ5Kz3lUp9F14mE72B2YyWaXHkW49wQOVZTN0NkTQsOmyrzySJ4fTZsEap660l7fAb 5WKwdfd4bvuhPzaCEGaTOyMQuKHdP1Su5aXb7axMG3HhuglQfwe9lsNukgCbjSkw7Kf1 LRbpfMx3qoAQCm7+EmAWzYeBGZo7sz/Kscj3cD7zQ+bDYFkvIDVDN4/B1UgIKGUJ74Uw 9K+yeeRQcFye9PEAzKQTlnKY5ulQy5sYPvp7tURpo9KSTiIq7IxEHZ+/47SUGo9kbg1g 7In6+GL3fFkfjbM38ySXyHHROWFkr6lp24aKerTkE6XRDSQiPanNd6Wp2eRT8/r2ZEGv TCuQ== 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=h8F38i8suUAoFNZrG8fQMHmr83Y+yXMyFeltzWfKKOk=; b=sTcbFUq9d869REG5r5+78p0HN7dVxvf5hBCZPiD2qaVWMck1wU1Z3hrfseVDuVpDv8 9RQDPF2gQH3jqgwNdX+Z7Py91U0HQzs5FdB1dsuJ5Phh2VFdcuAId9fAVQG4GOrcLzzz 9M7m1oXUkfJzZo7voTK3FsXj8wxD8knjBvlDBnG1ZZmcqxLXjEENhcAdafjh17MboI/e dUHMBDJQjXLb4zX9pAeNA5eKWvwI8NE4VSGEQGwcDg3G9QrGZwYwEBBwnNTmIBkC6Cug 9Q7FWsUthDlRb1mDPQwQM3ftr3r7IBsarCoL7c4MZDN4EL825WEW6r/MlVbMkaOOs8zp d0Jw== 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 b57si9629374wra.351.2017.11.05.12.20.29; Sun, 05 Nov 2017 12:20:29 -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 73E7B689F9B; Sun, 5 Nov 2017 22:20:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe07-3.mx.upcmail.net (vie01a-dmta-pe07-3.mx.upcmail.net [84.116.36.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37D9C689F72 for ; Sun, 5 Nov 2017 22:20:04 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe07.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1eBROx-0007qW-FG for ffmpeg-devel@ffmpeg.org; Sun, 05 Nov 2017 21:20:15 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id WLLB1w00d0S5wYM01LLCoE; Sun, 05 Nov 2017 21:20:12 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 5 Nov 2017 21:20:07 +0100 Message-Id: <20171105202008.29966-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171105202008.29966-1-michael@niedermayer.cc> References: <20171105202008.29966-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/aacdec_fixed: Fix undefined shift 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: left shift of negative value -801112064 Fixes: 3492/clusterfuzz-testcase-minimized-5784775283441664 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 ffd577c789..f96999efb4 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -309,7 +309,7 @@ static av_always_inline void predict(PredictorState *ps, int *coef, if (shift > 0) { *coef += (unsigned)((pv.mant + (1 << (shift - 1))) >> shift); } else - *coef += (unsigned)(pv.mant << -shift); + *coef += (unsigned)pv.mant << -shift; } }