From patchwork Mon Mar 13 02:36:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 2908 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp990878vsy; Sun, 12 Mar 2017 19:37:03 -0700 (PDT) X-Received: by 10.223.164.216 with SMTP id h24mr24716238wrb.128.1489372623822; Sun, 12 Mar 2017 19:37:03 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m139si9054304wma.32.2017.03.12.19.37.03; Sun, 12 Mar 2017 19:37:03 -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 4F5B0689D3F; Mon, 13 Mar 2017 04:36:40 +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 36505689D36 for ; Mon, 13 Mar 2017 04:36:33 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cnFqq-0003zy-Ei for ffmpeg-devel@ffmpeg.org; Mon, 13 Mar 2017 03:36:48 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id vEce1u0090S5wYM01EcfdP; Mon, 13 Mar 2017 03:36:39 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 13 Mar 2017 03:36:34 +0100 Message-Id: <20170313023637.1848-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/wavpack: Fix runtime error: shift exponent 137 is too large for 32-bit type 'int' 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: 808/clusterfuzz-testcase-4715513349406720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/wavpack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h index 445d593c3b..c949390f51 100644 --- a/libavcodec/wavpack.h +++ b/libavcodec/wavpack.h @@ -171,7 +171,7 @@ static av_always_inline int wp_exp2(int16_t val) res = wp_exp2_table[val & 0xFF] | 0x100; val >>= 8; - if (val > 31) + if (val > 31U) return INT_MIN; res = (val > 9) ? (res << (val - 9)) : (res >> (9 - val)); return neg ? -res : res;