From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2B987499A7 for ; Tue, 26 Mar 2024 00:12:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 510DD68D5EE; Tue, 26 Mar 2024 02:12:01 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD4FE68D5DC for ; Tue, 26 Mar 2024 02:11:54 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 245A340004 for ; Tue, 26 Mar 2024 00:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711411914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=a5Mf598dRUqirGn4AmSy9OTp/9bX0DepOUvafSa5+lw=; b=d2Zwm+0U9WPTnfIMjaPiCPG7n1bl4qyp6Ztz/34r/TOViGbYC+hxkCzwQgObFZ7NIFEHRi 9sQ46Lu59wv9+u9Il8B62lBaLqcmxkF5poNLOUFYbrW6cp3gScI/P6WV0ME6TGOaa5q0ed paQRDIxqL15oGXSzOAbj1PnJLNDL2tLMVTTiTG7OZBPdJgFi8cv6vPCOpdp5nhKY19a1YU G3Ugt1iTNJ8uwuI/CHnMw1mhUOCTTPykjMz4r7ivjIZraO/d/x56kPkLKwEoQpsc8GpT4p l6Q4wmZUIrlOVM5gRW+MUAvDJd6kz+xUGXa+39A+iJsIzfS3iku/MEsExE3WnQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 26 Mar 2024 01:11:44 +0100 Message-Id: <20240326001151.12083-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240326001151.12083-1-michael@niedermayer.cc> References: <20240326001151.12083-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 03/10] avformat/mov: use 64bit for intermediate for rounding 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: signed integer overflow: 1768972133 + 968491058 cannot be represented in type 'int' Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4802790784303104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index f954b924a02..e5e704caeb1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8993,7 +8993,7 @@ static int mov_read_timecode_track(AVFormatContext *s, AVStream *st) /* 60 fps content have tmcd_nb_frames set to 30 but tc_rate set to 60, so * we multiply the frame number with the quotient. * See tickets #9492, #9710. */ - rounded_tc_rate = (tc_rate.num + tc_rate.den / 2) / tc_rate.den; + rounded_tc_rate = (tc_rate.num + tc_rate.den / 2LL) / tc_rate.den; /* Work around files where tmcd_nb_frames is rounded down from frame rate * instead of up. See ticket #5978. */ if (tmcd_nb_frames == tc_rate.num / tc_rate.den && -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".