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 961964AAB8 for ; Thu, 11 Jul 2024 23:34:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B58E768DB21; Fri, 12 Jul 2024 02:34:24 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D530168D9D6 for ; Fri, 12 Jul 2024 02:34:18 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id F27A120004 for ; Thu, 11 Jul 2024 23:34:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720740858; 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; bh=1onBELY/6TQ7+H4w52aoBsx7kPNFt2nn2unC8aw3rvQ=; b=pcipINZjvQtdJK+cONNvXGuHtfs2gT4uJjfnSKwLNnuS7EN74AA0F9r4w/gEZI6CaJcvVP b+9udz5Mk9BTWBlDG5s/wt3cF0lCy0b4JtmEsf3z4JpNXBkn557IudHVLWa6v83gOSx/sW e5xDIufAu+8g+1cTOuD2iBTrHxZaIw7oa0vV5+aY0ShRVvq7kFmjdEehkA/8boV1pgTygZ gHYxaPB64m0ZJQ2AWxaBM3G0w3e0Z2ekAV9goCWPOYuhL0YXNQ7Y9GRcdlJEOMOE5nWDbP MvFXStbjTZyF8bPCXiMTvFDSO+9xrvutjQXJDybBLZa7irpmCLWbkkthFuJsNg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 12 Jul 2024 01:33:55 +0200 Message-ID: <20240711233417.1896879-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 01/22] avformat/asfdec_o: Check size of index object 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: We subtract 24 so it must be at least 24 Fixes: CID1604482 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/asfdec_o.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index dfe448e9f7e..dd187e600d0 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.c @@ -867,6 +867,9 @@ static int asf_read_simple_index(AVFormatContext *s, const GUIDParseTable *g) int64_t offset; uint64_t size = avio_rl64(pb); + if (size < 24) + return AVERROR_INVALIDDATA; + // simple index objects should be ordered by stream number, this loop tries to find // the first not indexed video stream for (i = 0; i < asf->nb_streams; i++) { -- 2.45.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".