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 774FE49A03 for ; Wed, 27 Mar 2024 07:39:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D3F6B68D516; Wed, 27 Mar 2024 09:39:32 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 555F368D4ED for ; Wed, 27 Mar 2024 09:39:26 +0200 (EET) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=TNmTKQjF; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C07FA240DAC for ; Wed, 27 Mar 2024 08:39:25 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 8VkI-IBtprQ2 for ; Wed, 27 Mar 2024 08:39:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1711525164; bh=u8fmfVerD7YqUjF+b9Lga4B1E6Objm87wUqKjWkqdrs=; h=Subject:From:To:In-Reply-To:References:Date:From; b=TNmTKQjF4QXiyI5++T3oeZBRCJ12tZbpHmXvuNe44ogSbhbnrl9QLsfOSNtDYlkA0 7mW4uDFcKGAMxPyLxXJKcvo0LCGZzBO3ycUZZkelqYWGcHN+X0EMTxjTvg7XbMOE/L 1O7sFToNBo58Aw/un8qYB05c2OtLeN7TCdwdZD2KT6y4EtPJZVsEEsgT/sEw+djvtL V/sf6YhAMX3Qr7xBd7EaYoXyXrQbXapzIL2xjD6kx6ej5D1H9SLJqEXa/+WBRmxqPi 3Xi6nSQPgFurMuXY8ZZ8nB6iRUf/WA8k8XF+bun77hEnTofUxPm+TNY4UddKeH1+47 /7Q9lKWrDmmPg== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id D710A2404AF for ; Wed, 27 Mar 2024 08:39:24 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 04AD51601B9; Wed, 27 Mar 2024 08:39:18 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240322230818.18997-1-michael@niedermayer.cc> References: <20240322230818.18997-1-michael@niedermayer.cc> Mail-Followup-To: FFmpeg development discussions and patches Date: Wed, 27 Mar 2024 08:39:17 +0100 Message-ID: <171152515798.7287.8979021106267679923@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/3] avformat/cafdec: sanity check channels and bps 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: Quoting Michael Niedermayer (2024-03-23 00:08:16) > Fixes: Timeout > Fixes: 67044/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5791144363491328 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/cafdec.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c > index 426c56b9bd..334077efb5 100644 > --- a/libavformat/cafdec.c > +++ b/libavformat/cafdec.c > @@ -33,6 +33,7 @@ > #include "isom.h" > #include "mov_chan.h" > #include "libavcodec/flac.h" > +#include "libavcodec/internal.h" > #include "libavutil/intreadwrite.h" > #include "libavutil/intfloat.h" > #include "libavutil/dict.h" > @@ -87,6 +88,10 @@ static int read_desc_chunk(AVFormatContext *s) > st->codecpar->ch_layout.nb_channels = avio_rb32(pb); > st->codecpar->bits_per_coded_sample = avio_rb32(pb); > > + if (st->codecpar->ch_layout.nb_channels > FF_SANE_NB_CHANNELS || I dislike this. -- Anton Khirnov _______________________________________________ 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".