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 579904BDC0 for ; Sat, 21 Jun 2025 21:16:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6267568CC56; Sun, 22 Jun 2025 00:15:35 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 118A468CA20 for ; Sun, 22 Jun 2025 00:15:27 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5FC6F4439B for ; Sat, 21 Jun 2025 21:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750540526; 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=oy57WJd3InPlmk3AVXwEHxb36ylwtauF9XHJCkpwzSc=; b=fjM7v+7tFmNpyAG9oTG4b6UcUWkhcCxWl1vXUgVznZyShvxNZRmWVVGT6cxeqbJW9bVW43 9hegjjmiL3I6lkWuncCkt/6nvC2KqDEoY8Zigr3PVTFy2toPQRPTCISCua8ohUsotU4sPX lktmcmQBumHZuCGw1xwoDNr8SnmdWRTzgecQEZWCFCyupBipew6Ia1Kse+dUMAoAlEbE5A rI2wRfhf9weF6E5NdHsVvHV+wE5MeEqX7RYaokR8HMuU0if0MTi7FFslhiHUK1OahOtaXW TbrF9YQjubzynr4VvYdOR6NO2eMCHtogle0j79/c7l0BUmzF3pB201mGb5VteQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 21 Jun 2025 23:15:20 +0200 Message-ID: <20250621211521.895204-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250621211521.895204-1-michael@niedermayer.cc> References: <20250621211521.895204-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvdeffecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/5] avformat/iff: Check nb_channels == 0 in CHNL 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: division by 0 Fixes: 418396712/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-6104388018176000 Fixes: 418478219/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4569544410857472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/iff.c b/libavformat/iff.c index 9402be48c98..4ff10beb38a 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -284,7 +284,7 @@ static int parse_dsd_prop(AVFormatContext *s, AVStream *st, uint64_t eof) return AVERROR_INVALIDDATA; st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; st->codecpar->ch_layout.nb_channels = avio_rb16(pb); - if (size < 2 + st->codecpar->ch_layout.nb_channels * 4) + if (size < 2 + st->codecpar->ch_layout.nb_channels * 4 || !st->codecpar->ch_layout.nb_channels) return AVERROR_INVALIDDATA; if (st->codecpar->ch_layout.nb_channels > FF_ARRAY_ELEMS(dsd_layout)) { avpriv_request_sample(s, "channel layout"); -- 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".