From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 4AC5E44B5D for ; Sat, 21 Jun 2025 21:15:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 52A7E68CA20; Sun, 22 Jun 2025 00:15:32 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7B80C68C3C3 for ; Sun, 22 Jun 2025 00:15:24 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C30C34396D for ; Sat, 21 Jun 2025 21:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750540523; 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=o6VyS3KLnRP+0W5W5mzeEWLOLjg68VseSciax7LMd60=; b=BtiIVSAYytLripPj8JlnHvwZ/E9xwCny9w67ndkU8BpcX81WNp5+n/hWK3Uv0H94abwkqJ rTIURgrwG3hdIRob1+QdXGAC9xhXK8yfUua3jnywBMMjocvKUNpebd6HhmqNh9lhgV4edv 3toH/ICGvimb1a/GasWlvyQqS31pmRFKhoSEjHK0jOY3ywMunb/aVSGGp979x/6gRR+Kzi qQQOMlFNbwWDe0QEdeYqBqIC/zMcW7hKf1/WPFKRL2dYQg7x+71+I43ezlJwjfBaVeuQCM 9PNI/+J3zcyyTERIa/C0RwF7BorPxOvjnur+PzMHIpxPKqvEDS0YPXL3uhszZg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 21 Jun 2025 23:15:18 +0200 Message-ID: <20250621211521.895204-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250621211521.895204-1-michael@niedermayer.cc> References: <20250621211521.895204-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvdeffecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avformat/mov: Check edit_list_dts_entry_end 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 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: 5269246886373498912 + 4035225266123964416 cannot be represented in type 'long' Fixes: 418319157/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5452638340841472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 6e9e3498fb5..401fdf70fb4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4245,6 +4245,10 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) st->index, edit_list_index, edit_list_media_time, edit_list_duration); edit_list_index++; edit_list_dts_counter = edit_list_dts_entry_end; + if (av_sat_add64(edit_list_dts_entry_end, edit_list_duration) != edit_list_dts_entry_end + (uint64_t)edit_list_duration) { + av_log(mov->fc, AV_LOG_ERROR, "edit_list_durations sum exceed 64bit\n"); + break; + } edit_list_dts_entry_end += edit_list_duration; num_discarded_begin = 0; if (!found_non_empty_edit && edit_list_media_time == -1) { -- 2.49.0 _______________________________________________ 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".