From patchwork Sun Jul 2 02:28:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 4186 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp7628469vsb; Sat, 1 Jul 2017 19:29:19 -0700 (PDT) X-Received: by 10.28.13.138 with SMTP id 132mr20210868wmn.23.1498962559395; Sat, 01 Jul 2017 19:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498962559; cv=none; d=google.com; s=arc-20160816; b=GLa9kKh9yGysTvzZBfLu8xZ+h6706NjCX9skjsIGHucLVd9BB8TTrrUIwCwyfnVX9l 7Igme2Q9Cj2s1wTEJJLcRErW4MhviW1eoqsaE3qfNiC3A1DwMVF+ysbO2RBg28W+A0Zw EnfncqTs4wteKUJDTSaA2VNRRygRmlA0qwenviZGujXdRLyOjbY22hdrE8ckzNI5KtMR wlUOt4ko0uL8TbXec4gNRpUgO4jreNG1JPWffCxbLtJbg40jjzJUQaXhbm1MOOqlBW3G roPh2w7H6AwJ3bN8uUt4j4MJ3tcSRYpFsNX4K8VdGtMExBnQYywPfge/UZiOrHH+35oA dpWw== 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=l0lPRYLn3MnqMw8orhoqYXeT1eqZd/VqguyJlCk1oZU=; b=z0F6jIIuBrPGDyX2A/I8qd/iRjObHTGWa5VhiAt3O58YIfHgq3yF2HH8J0/saYyC/4 7Cf/2l/dE0Prsv07Gphh0hrIP1ymfNDb4SdDt2KGgZxNSEqY/X2wJD0za/9b5I8CPlZ5 UNTQesq69HNQ4ZkIGU0jeSpJXUEz4HXCtJx63NapgCnMmi+SOBA/OUa9msQxheprBBkf XG0zi432AgCFkGwFe1sB0J5zHoQuq9w1g/1nfDt9L2sllqIcgYbfeiQXvCKfmYvlfULj 4rUja08ukAPg3YzIcrSOfacdHaAdizW5Xv8N+yRhvgc8XyzuHRdMQ4YDxeCktbeoI0Zv E5Lw== 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 k90si14551163wmc.87.2017.07.01.19.29.18; Sat, 01 Jul 2017 19:29:19 -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 80C5A680A0F; Sun, 2 Jul 2017 05:29:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe02-3.mx.upcmail.net (vie01a-qmta-pe02-3.mx.upcmail.net [62.179.121.183]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 14070680983 for ; Sun, 2 Jul 2017 05:29:07 +0300 (EEST) Received: from [172.31.218.36] (helo=vie01a-dmta-pe02-3.mx.upcmail.net) by vie01a-pqmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dRUdH-0005z1-BV for ffmpeg-devel@ffmpeg.org; Sun, 02 Jul 2017 04:29:07 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dRUdB-0008Qc-I0 for ffmpeg-devel@ffmpeg.org; Sun, 02 Jul 2017 04:29:01 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id feUz1v00i0S5wYM01eV0XC; Sun, 02 Jul 2017 04:29:00 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 2 Jul 2017 04:28:56 +0200 Message-Id: <20170702022856.16195-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170702022856.16195-1-michael@niedermayer.cc> References: <20170702022856.16195-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/aacpsdsp_template: Fixes integer overflow in ps_add_squares_c() 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: 1965219850 + 995792909 cannot be represented in type 'int' Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/aacpsdsp_template.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_template.c index 9e1a95c1a1..2c0afd4512 100644 --- a/libavcodec/aacpsdsp_template.c +++ b/libavcodec/aacpsdsp_template.c @@ -26,9 +26,10 @@ #include "libavutil/attributes.h" #include "aacpsdsp.h" -static void ps_add_squares_c(INTFLOAT *dst, const INTFLOAT (*src)[2], int n) +static void ps_add_squares_c(INTFLOAT *dst_param, const INTFLOAT (*src)[2], int n) { int i; + SUINTFLOAT *dst = dst_param; for (i = 0; i < n; i++) dst[i] += AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]); }