From patchwork Fri Dec 16 02:34:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1825 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp1093633vsa; Thu, 15 Dec 2016 18:34:29 -0800 (PST) X-Received: by 10.194.90.83 with SMTP id bu19mr474782wjb.68.1481855669816; Thu, 15 Dec 2016 18:34:29 -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 e6si4911527wjc.228.2016.12.15.18.34.29; Thu, 15 Dec 2016 18:34: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; dkim=neutral (body hash did not verify) header.i=@googlemail.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; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6F661689B73; Fri, 16 Dec 2016 04:34:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1EC4689B0D for ; Fri, 16 Dec 2016 04:34:15 +0200 (EET) Received: by mail-wm0-f65.google.com with SMTP id g23so2084444wme.1 for ; Thu, 15 Dec 2016 18:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=8sbON5++bFyXiY2pRKyQTxIxMAxyJVgPtoFEi5sWYRs=; b=WuY2MFY4DDdw/jejRsxPGNn1Tw8/w2iv+If1kdCnwrj9mUr8IUpj/ya/dJUMNJky3D WSzQifSS1azSFGoxNEKmreb3BEqsY1kd3V7ufWH/T2TD3dwWmhHNJ5NUd3yMcuEuLVwf tBKVXG4SmP/mV435wpYZj2a1/KfotGjkLUHSP3oYQpryhU0L3Ze3HyyBLEZKTfvW3vOS /4Xrq0GaIO86t0STuoBOosF0qoeq2LVT2R1O4MAHPuBhx9Npc11a+f4sMsBxRxDK0INg OUPruxLBCtQ03W9ktvhGPuWlJa0dGSEwzkpO1wnibN8CrFUucRHa83oKDWhHPzcg+7DN kBxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=8sbON5++bFyXiY2pRKyQTxIxMAxyJVgPtoFEi5sWYRs=; b=bnjl7qoGA9MKuKRmNuCmw+kkum2F07vzDPu8uDX1/i3iboZvqZyxPWmAsZwnQsZCve P0jIsneifuwmxBmdgcRP+gcVsLaSZQDyr0RZPaYxAekklI268dYopGUukKBZ5+P/A9J7 nh7LJoszDMQeqNY7eB4L55Pk9S8AkCqOzN6uuLGworSEaZOaVyxOR4tQykawOxE0jiEs 42xmXiexIk+g3AGy0zBzribFxP+I+MW2PyT+vjIu5lsEQheIl2pVkSVmkqiwBE5L/7QM llJxhAwDy/e5qVBV4KgLU+Z6dVkf5iWhKimHkI8+MXZZFEBeRb9po/3ZivamFDozNz+5 NWeg== X-Gm-Message-State: AIkVDXJ1dmheh//97BSN3pkdcnaCOdLZG637rbu5kBzbisNiKarfxTdrIktgIcAoyv7m3A== X-Received: by 10.28.98.130 with SMTP id w124mr561002wmb.125.1481855661680; Thu, 15 Dec 2016 18:34:21 -0800 (PST) Received: from [192.168.2.21] (pD9E8E08E.dip0.t-ipconnect.de. [217.232.224.142]) by smtp.googlemail.com with ESMTPSA id js10sm4648698wjb.19.2016.12.15.18.34.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 18:34:21 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches References: <9663f686-48d6-0d43-ce9b-848b467366be@googlemail.com> Message-ID: <01be60b1-7167-6f2b-4fc8-65274d0951fd@googlemail.com> Date: Fri, 16 Dec 2016 03:34:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <9663f686-48d6-0d43-ce9b-848b467366be@googlemail.com> Subject: [FFmpeg-devel] [PATCH 5/7] ircamdec: prevent overflow during block alignment calculation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Cadhalpun --- libavformat/ircamdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c index 59f3a49..3f92b6c 100644 --- a/libavformat/ircamdec.c +++ b/libavformat/ircamdec.c @@ -96,6 +96,7 @@ static int ircam_read_header(AVFormatContext *s) } st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id); + FF_BAIL_ON_OVERFLOW(s, st->codecpar->channels && st->codecpar->bits_per_coded_sample > INT_MAX / st->codecpar->channels) st->codecpar->block_align = st->codecpar->bits_per_coded_sample * st->codecpar->channels / 8; avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); avio_skip(s->pb, 1008);