From patchwork Fri Jan 6 19:49:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 2085 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp5977240vsb; Fri, 6 Jan 2017 11:49:36 -0800 (PST) X-Received: by 10.223.143.55 with SMTP id p52mr2502306wrb.64.1483732176783; Fri, 06 Jan 2017 11:49:36 -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 195si3408899wmr.165.2017.01.06.11.49.36; Fri, 06 Jan 2017 11:49:36 -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 9B4C468A244; Fri, 6 Jan 2017 21:49:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96B7368A114 for ; Fri, 6 Jan 2017 21:49:21 +0200 (EET) Received: by mail-wm0-f66.google.com with SMTP id u144so7383240wmu.0 for ; Fri, 06 Jan 2017 11:49:27 -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=mu3Wyzy64aNLb5AAtz6103IQ2gy3SpmswkcJQpIBM6w=; b=Zg3hBV0PnfVSiUJ1MUsTSj9EOZimXREKbI3j0dlzsL7w6vzmniK+phPmMJFQHSg9yh Z9DYNOv3zdQYDe1oC27LRXj9tAXCQKHSjw+rSBikZpsl2vTITKlRox4gU+3rEUaxvAY/ 8k8rvTayDA8TlvqE1jMAlRcKMN5/93ZnfhKcP3D7iRUL/0FY3AXnzJCdyy/x+JFRRYJN zL4oMrQ4CspmPVNTPqNLef4v8Sn3YEHRKR/NYisHNNxFUYgSRabzBhXoRLSgFcVo/8I0 AeRprEdOp6F/HIzV5lCDPD7hR1oNHM/YNwhsiDGlCU9kk2+qLUdPE/OHeEuhvdSFWyxh jnig== 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=mu3Wyzy64aNLb5AAtz6103IQ2gy3SpmswkcJQpIBM6w=; b=mZPdBzqD1zSWuIimQQmlazTv4Cv18rLLS/YxQp6zAs/kpSBaBQUGyBDaX2lRtRibkx DxRky1nXZTPwTe6EihzlpOekHqoru5Ak6GPZndE4H/3G4VoIrCcc9w1/Qa/CFmV3FtLS gXas4STkm7j7oBpNbvONix8i8ubcZ2da85kIMZILCEs3LnTc9wcFiFuF8rQ1g7TvXcfO YyBOZKpYlhS467zC/monh3LnMBb1vtIKRFYFqKXWdWYT11lAb5iSvga/ejP8I2Ie32LY YszQy1gA255Nvj5nSjx0JA1+5/J3PUJmmsUMLgvvcZTYX8pPizN8Q3oXcGc7GytHK+YM uLYQ== X-Gm-Message-State: AIkVDXKxknu78wNZBDiYzHGhPtRyDZj+e4K7Sf9MWbHiNLNi8RVg/we8dR7FKHres8xpaw== X-Received: by 10.28.134.204 with SMTP id i195mr99511wmd.77.1483732167060; Fri, 06 Jan 2017 11:49:27 -0800 (PST) Received: from [192.168.2.21] (p5B072B3E.dip0.t-ipconnect.de. [91.7.43.62]) by smtp.googlemail.com with ESMTPSA id c187sm4887973wmd.13.2017.01.06.11.49.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 11:49:26 -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: <6c13f789-e293-f929-7225-d520f59c22bc@googlemail.com> Date: Fri, 6 Jan 2017 20:49:26 +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 8/9] epafdec: 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" --- libavformat/epafdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/epafdec.c b/libavformat/epafdec.c index 29190fff72..b28f035cdf 100644 --- a/libavformat/epafdec.c +++ b/libavformat/epafdec.c @@ -83,6 +83,7 @@ static int epaf_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->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);