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 5A84540CAE for ; Sun, 6 Nov 2022 12:35:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 119B168B7B5; Sun, 6 Nov 2022 14:34:50 +0200 (EET) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 438D568B76F for ; Sun, 6 Nov 2022 14:34:42 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 3BC591C0005 for ; Sun, 6 Nov 2022 12:34:40 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 6 Nov 2022 13:34:29 +0100 Message-Id: <20221106123430.1668-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221106123430.1668-1-michael@niedermayer.cc> References: <20221106123430.1668-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 6/7] avcodec/bonk: Check step against overflow 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: No testcase Signed-off-by: Michael Niedermayer --- libavcodec/bonk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c index 37ad7854b6..f2427de4f1 100644 --- a/libavcodec/bonk.c +++ b/libavcodec/bonk.c @@ -180,6 +180,8 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) if (!dominant) n_zeros += steplet; + if (step > INT32_MAX*8LL/9 + 1) + return AVERROR_INVALIDDATA; step += step / 8; } else if (steplet > 0) { int actual_run = read_uint_max(s, steplet - 1); -- 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".