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 21E524AAD0 for ; Thu, 11 Jul 2024 23:36:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DEEAC68DC65; Fri, 12 Jul 2024 02:34:44 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 014B468DBAB for ; Fri, 12 Jul 2024 02:34:31 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 42F9340003 for ; Thu, 11 Jul 2024 23:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720740871; 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=u9P1psz3oYai5gpshjwZlcvxyYfifZ5SM1Z5aFlRu54=; b=VXYwDaVYpGB3SJE2un93BtdbByXfqYInj+udJm9IsBNpkBa8vyJjNJSOGxbyU2y7U+mCSK OGsI6SnFiTlSyGiT0uU3822VnygvAOH22MZP/mBY2tJhSOh8mJ/smIIA9kHCzTtD4tYEp7 P6rA/Iyuf5yKfZkKBJmXhv0Q9orSVI1flNCmYoeF9Meiu6u2GiHRzzkTXbckdBcOlldSdK lVwBShd3OGCCt/5SmDKMjW6m9KWg0NY6duAPxNJL8GHpa2C8JvVl+0icg/RzfSzHAEmFVi CwYGC6Dl8rJprVejNEVMMGYTKIHkzS8tpBxx2SQ1Num3zEee7Ic5UKFwDS4tsg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 12 Jul 2024 01:34:11 +0200 Message-ID: <20240711233417.1896879-17-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240711233417.1896879-1-michael@niedermayer.cc> References: <20240711233417.1896879-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 17/22] avformat/xmv: Check this_packet_size 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: CID1604489 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/xmv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/xmv.c b/libavformat/xmv.c index e103b2368ea..ed59f7b85bd 100644 --- a/libavformat/xmv.c +++ b/libavformat/xmv.c @@ -221,6 +221,8 @@ static int xmv_read_header(AVFormatContext *s) /* Initialize the packet context */ xmv->next_packet_offset = avio_tell(pb); + if (this_packet_size < xmv->next_packet_offset) + return AVERROR_INVALIDDATA; xmv->next_packet_size = this_packet_size - xmv->next_packet_offset; xmv->stream_count = xmv->audio_track_count + 1; -- 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".