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 ESMTPS id 9257A4E931 for ; Thu, 8 May 2025 21:58:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9735368C399; Fri, 9 May 2025 00:58:14 +0300 (EEST) 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 8298A68C13B for ; Fri, 9 May 2025 00:57:43 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C4A0142E7E for ; Thu, 8 May 2025 21:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1746741462; 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=UZKnY79/VYLBeKLyNeJdBFwm5Vel19Eb3yVJrSgAVLU=; b=MEbmO93QLidlKfByy4pdBtsWQ75y6W8MrNIlozM7ZkKlgFTeYdXgeYes6hHnCdN3jWbKZU EEh613Sc40BHkn9RQdwu3XAJ0A6nFFA8liS3VAnOvCg1yfLs89wa8q8vVmb1ukMmqNT5Ji i8FNp7nxu4SKO7dOxrBBhjS/QcGb9mMXJm4HGEnRdWmbLPw4KMiF+lVtv0ykv70upccQ8b MeThCooErJahPQxc6nW0fDTyYVtHyyRa4NEj39ndV5vr7kdHE/AhLnZ5Zd6Ehhdq6BNzpz JgP/BEFBTSXtzfDfG2boSHZsrneA5uWLwdpVxoCwJeu6l4DWPdiVY1yz6t/sBw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 8 May 2025 23:57:35 +0200 Message-ID: <20250508215738.3582069-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250508215738.3582069-1-michael@niedermayer.cc> References: <20250508215738.3582069-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvledtkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/7] avformat/iff: Check nb_channels == 0 in MHDR 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: 395163171/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-542604339373670 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, 2 insertions(+) diff --git a/libavformat/iff.c b/libavformat/iff.c index 7142a06e98f..9402be48c98 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -510,6 +510,8 @@ static int iff_read_header(AVFormatContext *s) sta->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; else if (sta->codecpar->ch_layout.nb_channels == 2) sta->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; + else if (sta->codecpar->ch_layout.nb_channels == 0) + return AVERROR_INVALIDDATA; break; case ID_ABIT: -- 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".