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 12687422CE for ; Wed, 2 Mar 2022 14:01:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F360C68B2C2; Wed, 2 Mar 2022 16:01:45 +0200 (EET) Received: from vie01a-dmta-at03-3.mx.upcmail.net (vie01a-dmta-at03-3.mx.upcmail.net [62.179.121.153]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE93168B0DF for ; Wed, 2 Mar 2022 16:01:39 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1nPPXv-00032Q-62 for ffmpeg-devel@ffmpeg.org; Wed, 02 Mar 2022 15:01:39 +0100 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id PPRGn74WYSgGFPPXvn88Tb; Wed, 02 Mar 2022 15:01:39 +0100 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id PPXgnSnm8OPqFPPXgn28Ju; Wed, 02 Mar 2022 15:01:24 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.4 cv=OcX7sjfY c=1 sm=1 tr=0 ts=621f78c2 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=qX5wZS9MHFB6eZLz2DQA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 2 Mar 2022 15:01:24 +0100 Message-Id: <20220302140124.12313-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfOT+vlTqOY4Etrvx430Nmg5ag8jjcNBcSTpVh386/qqLLIhC6TCBUg+LiFKpcMnRobrGbPPB4fWXxkLmWmUTU60W9WtDWSKYQ3x9B3qWXt2IsYq8idx+ vf5zPC307i0adv5ii77Qd2I0J3NCmQNIdc8F2lKuQJHa9ZDyzvkgulk8dcN25d3gUaTEVOCp7XZQiw== Subject: [FFmpeg-devel] [PATCH] avformat/mov: Disallow empty sidx 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: It appears this is not allowed "Each Segment Index box documents how a (sub)segment is divided into one or more subsegments (which may themselves be further subdivided using Segment Index boxes)." Fixes: Null pointer dereference Fixes: Ticket9517 Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 5e26267810..68b6d7f075 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5118,6 +5118,8 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb16(pb); // reserved item_count = avio_rb16(pb); + if (item_count == 0) + return AVERROR_INVALIDDATA; for (i = 0; i < item_count; i++) { int index; -- 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".