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 79B1A49971 for ; Mon, 25 Mar 2024 03:29:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14A4168D437; Mon, 25 Mar 2024 05:29:16 +0200 (EET) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA8C268D33C for ; Mon, 25 Mar 2024 05:29:09 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id D108E60002 for ; Mon, 25 Mar 2024 03:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711337349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=zPgQ/Fbj24K8DSTUvFkOVa9jLGfKD0VvtZRyewl5eFc=; b=C8PSozQnBbq7QI5HSOTdlyVxNpcWoEP3oNnr1HF1DY8r/gsH/Nd6nAi1ERMnTXDWHuuSR9 F2f23FlaRNuWAGcPgHRyaWi6bQMepD87z/l1azNcC6Ez6+T/xqURtfzHZANCRynDFVDoSw 3V3MJD3TJC+TM7bDG0XCVyOpdOqNXAfC8+yj8DgDL9Nsi7+3i6e1MkTR2fKWdHhcxg1yf5 leZrU3DrmIvLf1Ys0HU+lTZa2517cz7YhSrYiOoNx2gzAjDifahL74HwFKPaCNR5EY/Fq6 zuZu0CSJFtHg/moclXqiYtn3Wy0Dr7x4cNB3yyvmPYkv/1RgxgQPbVzK8ln/Zw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 25 Mar 2024 04:29:07 +0100 Message-Id: <20240325032908.11939-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Check edit list for overflow 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: 67492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5778297231310848 Fixes: signed integer overflow: 2314885530818453536 + 7782220156096217088 cannot be represented in type 'long' 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 a87ce5cefe..5dbe61a005 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3683,6 +3683,10 @@ static int get_edit_list_entry(MOVContext *mov, } *edit_list_duration = av_rescale(*edit_list_duration, msc->time_scale, global_timescale); + + if (*edit_list_duration + (uint64_t)*edit_list_media_time > INT64_MAX) + *edit_list_duration = 0; + return 1; } -- 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".