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 6CCB2499DE for ; Sun, 25 Feb 2024 23:24:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3599368C7C2; Mon, 26 Feb 2024 01:24:05 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 250F068C775 for ; Mon, 26 Feb 2024 01:23:56 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 51EC5E0005 for ; Sun, 25 Feb 2024 23:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1708903435; 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=t9TCxZYpK4M4jrnfecM9bimTbEs6PIjA4ETGWOvHxrM=; b=ITM91vQKlZD5VnRlw/Lf1N49CXjaHBoZ3En+Xb9g5+bQ62DMJCXNozJ4g75+oRzLxmq/yC QnZhfxV9LBn3n3lZIjVkrRlco742tO5vrnwLJIE6W7BRy0r6SYpZl8IyCk83vAx7C4mkYN 8vwXvTbGriVrhaEyVAmZSHVrC8p45ExPTxNFVi00ecigfacUWWCjo8TCi+m6Jt5e897vAL +HCDJyzwj6iZAxibMX8oHWk6gbFkdGqHl/t2AcNWl4eVwWxkOOmYtDgkLyslVL7qP0YKcm zN5prwNAsLU6Qh2+j2XSoxpHERa1bcnFBmHUFHXd4SiU/lPVwl9wWBzadZZzyQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 26 Feb 2024 00:23:53 +0100 Message-Id: <20240225232353.23735-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240225232353.23735-1-michael@niedermayer.cc> References: <20240225232353.23735-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/2] avformat/concatdec: Check in and outpoints to be to produce a positive representable duration 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: -93000000 - 9223372036839000000 cannot be represented in type 'long' Fixes: 64546/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5110813828186112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index ffa8ade25b..7abe03c26d 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -638,6 +638,12 @@ static int concat_parse_script(AVFormatContext *avf) } } + if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) { + if (file->inpoint > file->outpoint || + file->outpoint - (uint64_t)file->inpoint > INT64_MAX) + ret = AVERROR_INVALIDDATA; + } + fail: for (arg = 0; arg < MAX_ARGS; arg++) av_freep(&arg_str[arg]); -- 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".