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 AEF8A4A3E8 for ; Tue, 30 Apr 2024 00:49:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A0CB968D587; Tue, 30 Apr 2024 03:49:04 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0B9E068D561 for ; Tue, 30 Apr 2024 03:48:56 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1C02F1BF203 for ; Tue, 30 Apr 2024 00:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714438136; 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=uVRToFO6Gt4tXh4k1FYQ0sszWkEVCShSwTN1UssAyuE=; b=WqG/79RdoKIPOSyJ+Qcmrj3BAhqryYehSgRkXKiy5uc/jloqAcAfrVf9lbf7By5VH/0lIQ GbBGx+PbtzYX1bnQYYkt6ahAGVB1l/IPg5u8XUVRgq/NLt26bU2PGTm2FVBzg83sO6N/bj hbt1151+JOgleo7QsdV440rOe5HUzw/L6vv9/4Yp8enMotW41//nG8Jo1GHLuJdR82eahN XeAl2O4AM11DUxf7VJs3B46gL3+dT8fGad2WFJCnppTia1FN+f9Pu86dx2uQG0g8TC4SNP L7MhSWEJpl+kxCLuJy+HAsq33A6yqrUYm8noYATpV23Ts3VVdKrgM4UKYqWRVw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 30 Apr 2024 02:48:53 +0200 Message-ID: <20240430004854.199741-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240430004854.199741-1-michael@niedermayer.cc> References: <20240430004854.199741-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/3] avformat/concatdec: Check file 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: null pointer dereference Fixes: -stream_loop 1 -ss 00:00:05 -i zgclab/ffmpeg_crash/poc2 -codec:v copy -codec:a aac -y output.mp4 Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 493659649cf..fe65d0c7688 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -639,6 +639,11 @@ static int concat_parse_script(AVFormatContext *avf) } } + if (!file) { + ret = AVERROR_INVALIDDATA; + goto fail; + } + if (file->inpoint != AV_NOPTS_VALUE && file->outpoint != AV_NOPTS_VALUE) { if (file->inpoint > file->outpoint || file->outpoint - (uint64_t)file->inpoint > INT64_MAX) -- 2.43.2 _______________________________________________ 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".