From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 7C11848931 for ; Wed, 16 Jul 2025 00:52:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 8215668DD5B; Wed, 16 Jul 2025 03:52:19 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 640EC68DBD3 for ; Wed, 16 Jul 2025 03:52:11 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C63E143B10 for ; Wed, 16 Jul 2025 00:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752627130; 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=PucC+oTtlGXjGFbc5yhZB3RGxsgsMZoVkcMuX1xUSgQ=; b=D7BoB5XwTzad+HnEanT0887o8wuIGW/mGsaxfkHlH4t7AX1ST5eTnH58meCXcnrx/WZ4SE NJggxD2PCox4oU6QvGYqN3Jnl5BlHffyTPIA9fiaqbhXg3mlJtExKJ0dmNu8YBUYiNZbun YYYBkJamBypLnawgOV0MjHmz3/q9AXNczTWT6N8rdUmifs9PDyyhmmwxuPvpmFIlHX1J6O aI9DtWucvt5Nq5eiT6nSxTlRT/3nj62RNobg+q3TTJUtbL1KEEpLin4arU0rq61/Lab3Um BKFEtLnWtuZNe6hZD7SSDgoGkY3JHjHoercN9kZ7Cm72fDebAINw5HLzOK2xXQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 16 Jul 2025 02:52:05 +0200 Message-ID: <20250716005208.4109775-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250716005208.4109775-1-michael@niedermayer.cc> References: <20250716005208.4109775-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdehieefudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/ivi: Check luma/chroma mb_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: shift exponent -1 is negative Fixes: 429011224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5031059358285824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ivi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index e7d8d10c3e0..a38f382d5f2 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -994,9 +994,11 @@ static int decode_band(IVI45DecContext *ctx, for (t = 0; t < band->num_tiles; t++) { tile = &band->tiles[t]; - if (tile->mb_size != band->mb_size) { - av_log(avctx, AV_LOG_ERROR, "MB sizes mismatch: %d vs. %d\n", - band->mb_size, tile->mb_size); + if (tile->mb_size != band->mb_size || + ctx->planes[0].bands[0].mb_size < band->mb_size + ) { + av_log(avctx, AV_LOG_ERROR, "MB sizes mismatch: %d vs. %d vs. %d\n", + band->mb_size, tile->mb_size, ctx->planes[0].bands[0].mb_size); return AVERROR_INVALIDDATA; } tile->is_empty = get_bits1(&ctx->gb); -- 2.49.0 _______________________________________________ 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".