From patchwork Fri Mar 3 19:12:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 2747 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.31.14 with SMTP id f14csp386992vsf; Fri, 3 Mar 2017 11:12:40 -0800 (PST) X-Received: by 10.28.224.11 with SMTP id x11mr4162131wmg.98.1488568360070; Fri, 03 Mar 2017 11:12:40 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b70si4015929wmd.99.2017.03.03.11.12.39; Fri, 03 Mar 2017 11:12:40 -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 626C368799F; Fri, 3 Mar 2017 21:12:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-3.mx.upcmail.net (vie01a-dmta-pe01-3.mx.upcmail.net [62.179.121.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4238E680988 for ; Fri, 3 Mar 2017 21:12:18 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cjscv-0007cP-8I for ffmpeg-devel@ffmpeg.org; Fri, 03 Mar 2017 20:12:29 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id rXCR1u00k0S5wYM01XCS7w; Fri, 03 Mar 2017 20:12:26 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 3 Mar 2017 20:12:22 +0100 Message-Id: <20170303191222.5097-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170303191222.5097-1-michael@niedermayer.cc> References: <20170303191222.5097-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/dcadsp: Fix 2 runtime error: signed integer overflow: -1958094138 - 1078906344 cannot be represented in 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: 722/clusterfuzz-testcase-5711268868521984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/dcadsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c index 1503d00886..4f1e933cfb 100644 --- a/libavcodec/dcadsp.c +++ b/libavcodec/dcadsp.c @@ -347,7 +347,7 @@ static void dmix_scale_inv_c(int32_t *dst, int scale_inv, ptrdiff_t len) dst[i] = mul16(dst[i], scale_inv); } -static void filter0(int32_t *dst, const int32_t *src, int32_t coeff, ptrdiff_t len) +static void filter0(SUINT32 *dst, const int32_t *src, int32_t coeff, ptrdiff_t len) { int i; @@ -355,7 +355,7 @@ static void filter0(int32_t *dst, const int32_t *src, int32_t coeff, ptrdiff_t l dst[i] -= mul22(src[i], coeff); } -static void filter1(int32_t *dst, const int32_t *src, int32_t coeff, ptrdiff_t len) +static void filter1(SUINT32 *dst, const int32_t *src, int32_t coeff, ptrdiff_t len) { int i;