From patchwork Thu May 23 01:17:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49158 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:542:0:b0:460:55fa:d5ed with SMTP id 63csp734618vqf; Wed, 22 May 2024 18:18:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCULwkGJPE6F8JNqy7qkzeAal5fKSlYcSMg2gSr4jeMJ34/lcTN6mN60bmbKTrlty2mG2tBTwPKfk/C4StLh3rkKWwiyYg+PeY8ELg== X-Google-Smtp-Source: AGHT+IFh3gQy7tFaohUA2cL+tyZIAMOXHl09IwIFqKMH+I37hcUIYv+TvIcaNn+lyZAnsKi6RUri X-Received: by 2002:a2e:720c:0:b0:2e4:f8e:3a64 with SMTP id 38308e7fff4ca-2e949518e3emr21831881fa.30.1716427127118; Wed, 22 May 2024 18:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716427127; cv=none; d=google.com; s=arc-20160816; b=yaBVwPWJfBDPyic6jjpFuH4kfPcxHh25oOXfFxV3xcSDRRjQx+pmf5eXO5eqVx2iXB kQZOD0EB8ZFexFIcl873rx7aW+ayw6TfnS4WU6aKf7euA3dz5zbIZDj9PYzJfFdSxyuH Y7xABtmHUQ7h/IU0dk7JE4PDc2NFoprRDbRgCHVVTf2UwwMz3GvbYwBgItdLZbIRm+/C Q9ZMb0GZ8Q+fw0zBFZZFX6dXxRz/s6duMt72GDiJVZVDRKbSHa2r7WdiwZ06StAWWupY JwFeMFX8HpZ7X0Xnl0haVAz/XJOW0tySjMVQYrCD8RRtDfpwNZXCObissZxi4OKo/y9V 7Wmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=lsuudjnuT1QCf9sE4v94ENjFN1OLtS4JhP2WASqw0HQ=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=MkpVroJ9wGGGUD8NhOrWL5SPa3yK3rB5tWZN38fVMepxYx1+/J+g1wQ8VXCAfUKLMh oy22e7POw+lMq1d3Jxii3g3LnWK2PNh9sKdkTWrL7Nkzal2NRY6EPlcnPPqOp4/ZiLCH IqjUWc3DVOf0rNrfxrr8pAw1TWfYlB20OL1Yr8ZjCUrtzatMDcCtHT2ydWXpSxiI+ygb myq0jbROzgl4JzF+Y7bOci7PxUTSta1HLNyGLagwEkVTi3k0O35eNESZlzdyCbEJf+qy QRfcw78bwLlA/AesJsms8L6FVnv1VCG5XD/Q96K2X8XbxWxFqu0xb9yySgkwVlVbAgSy /aMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=nTPDSKFf; 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 4fb4d7f45d1cf-5733c2d5cbbsi15283246a12.307.2024.05.22.18.18.46; Wed, 22 May 2024 18:18:47 -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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=nTPDSKFf; 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 1C8EC68D41D; Thu, 23 May 2024 04:18:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 42CA068D229 for ; Thu, 23 May 2024 04:18:04 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6E4B01C0004 for ; Thu, 23 May 2024 01:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716427083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9K4fHZld7xlSc2of2uaMGY1q3X7QZlD70/vZtNiU0h4=; b=nTPDSKFfVqjdekFZKN2rgAYYEaExKTAIaRSqL7k84NSBTz47ORtJYvXq36PnNUryCHY/7/ Qt73if4zAS6iGRyIOyKxxmTFPYAIADTW8bux5pJ7D19xniPZf7B/oh/KuBe2xCGsl6Y7S9 XXJigDdFRwbzz6yHrA/4UmrjMQIxY0TCbah0juGPORcdJafhBL8W0ds2W1P8A0LPZd2EtF DpIPVyZH6WwkINJpsI3OaG6ANWq+1SWpV4NC0PHhiAMKX7r9rrs/0pQtX8C3KsW8/0hG/0 iS5wAJ7n3cQ/ZxE5Z3YJpwTDWAyxVTvIM6cGQrGjKbSSGb7AiHMIp8FTDc/otA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 23 May 2024 03:17:56 +0200 Message-ID: <20240523011758.2434580-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240523011758.2434580-1-michael@niedermayer.cc> References: <20240523011758.2434580-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/7] avformat/asfdec_f: Use 64bit for preroll computation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: w/orFsfWVytz Fixes: CID1500342 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/asfdec_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index fcc2b98a2c4..2441cadb444 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -675,7 +675,7 @@ static int asf_read_marker(AVFormatContext *s) avio_rl64(pb); // offset, 8 bytes pres_time = avio_rl64(pb); // presentation time - pres_time = av_sat_sub64(pres_time, asf->hdr.preroll * 10000); + pres_time = av_sat_sub64(pres_time, asf->hdr.preroll * 10000LL); avio_rl16(pb); // entry length avio_rl32(pb); // send time avio_rl32(pb); // flags