From patchwork Fri Jan 6 19:48:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 2080 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp5976889vsb; Fri, 6 Jan 2017 11:48:34 -0800 (PST) X-Received: by 10.28.14.65 with SMTP id 62mr113042wmo.85.1483732114130; Fri, 06 Jan 2017 11:48:34 -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 j199si3419610wmg.135.2017.01.06.11.48.33; Fri, 06 Jan 2017 11:48:34 -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 sp=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 497A168A15D; Fri, 6 Jan 2017 21:48:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 381D66897F8 for ; Fri, 6 Jan 2017 21:48:19 +0200 (EET) Received: by mail-wm0-f68.google.com with SMTP id c85so7313480wmi.1 for ; Fri, 06 Jan 2017 11:48:25 -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=PPg+m98TE9s1P5/NKwHLq67RH6RBNDVa7eC4RDYvaSY=; b=HbxrTueFLrf8C1QWQ+q+mz6OPU6fwCW6Kuv6D/WmDQflTcdHzUwiDrRvbVafUIfcCt WTM+V3kpmedxkkJnaCbrfZng8deBrIl4wzNM8xCW8nVcWCtIFN7OGvZB8y9ooPMtIb5M 0Mpc1UgGP2Pd7D4k1qWBd6XRUsaE/KkvLw20sWTGHjPJU8bmNv+mWQNurDhDdxGw76/h reJFiROouvym0+1tO3k3S7flYOZnhURt96tQT2Y0Oam2kT/X1GUdBm2Pz+s4zBamwIqY OtEGMjM3rH+gvMl5RYzoLGO6ZFguOScIjV/SjJ35T+qZbmpZmAjuFASUguIe6LSwM+k8 qCLg== 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=PPg+m98TE9s1P5/NKwHLq67RH6RBNDVa7eC4RDYvaSY=; b=Foqd7R72VRcCtqwNo6kuldHDeH8EKJ15SrugRX26V0Sb9kq/CeClYH+zXw4lBfhWMa LyVQGBx8u3lB6KK8ssvces1RVIN3eB9TgBOd2mC6pAoE4D0TksabOekNAOZG43J3+Nen HGMHsDcguRKUEnE5Ps4O3tg8BCEDvVdueFcUeecoMboVsB5OKnoRz3AExEN1pKJU3Z7V cyEU6V9aa73xopSJtDq9Fum+W3OUCL1hga4liN9jLucudmZO/340aOc7DTK+Doz3Ky1K RojL8Snpj2oWJhgo2BiVEg93e90YvAOHE6LFxoOL/txCzXqGzVPtR1Nzj9+CADP9eJlo 1Dsg== X-Gm-Message-State: AIkVDXImM0dVdgWyLvEwswT7YwQkF3msefrNurOSzuI+hua/ayIc8XjPcMV/t3NjM29oCg== X-Received: by 10.223.154.43 with SMTP id z40mr2459431wrb.176.1483732104726; Fri, 06 Jan 2017 11:48:24 -0800 (PST) Received: from [192.168.2.21] (p5B072B3E.dip0.t-ipconnect.de. [91.7.43.62]) by smtp.googlemail.com with ESMTPSA id ke6sm110321653wjb.21.2017.01.06.11.48.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 11:48:24 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches References: <8f290505-70a1-d5b0-cbcf-96522ab12ce4@googlemail.com> Message-ID: Date: Fri, 6 Jan 2017 20:48:23 +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: <8f290505-70a1-d5b0-cbcf-96522ab12ce4@googlemail.com> Subject: [FFmpeg-devel] [PATCH 5/9] 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 59f3a49411..f3cf4d0dc9 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_RETURN_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);