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 69D524AF88 for ; Tue, 25 Jun 2024 19:28:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C46C68D636; Tue, 25 Jun 2024 22:28:02 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10DE168D409 for ; Tue, 25 Jun 2024 22:27:56 +0300 (EEST) 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=FpIEey5l; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C94C6240DAC for ; Tue, 25 Jun 2024 21:27:55 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id cY9WSCFTPBSg for ; Tue, 25 Jun 2024 21:27:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1719343675; bh=8TkH7HJWe+rZvkPs0mbFHfjHZWg3NQYMv5YM1IgdESo=; h=Subject:From:To:In-Reply-To:References:Date:From; b=FpIEey5lHNO0rfvAU5vBk5mJZc3dcRe/QUIptWdq8I6hgebmTL6WQ02tAgo/4C9uK +ZEcKVJ47lvr2zb9EH31VaUOp0I2hA8FJ3UKMcdyCbKD8dP30W+BLofjeb075CoJPQ ANA8TP7YCfrHS6CVDZ4zaZ8f3+6/i7QYqEO58S+viTHMx0TCjbnoxYOlgppMLiYjxP WkJQUXSqnFqU47nyGGZONUITcQD6+H53QoSjl6VQlsMPTss8dgo2GQrtI/EtNag04V 7vonQUeHimn9N2Ql4xLS4LAsfHEgXWWOYyxcL/5gLHpooE7ODyPvyum7Vdcn+xwWaQ nrPKdMNmq9Pww== 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 4B12A2404E5 for ; Tue, 25 Jun 2024 21:27:55 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 3696D1601B9; Tue, 25 Jun 2024 21:27:55 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240625192546.GG4991@pb2> References: <20240322230818.18997-1-michael@niedermayer.cc> <171152515798.7287.8979021106267679923@lain.khirnov.net> <20240327232702.GM6420@pb2> <20240625192546.GG4991@pb2> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 25 Jun 2024 21:27:55 +0200 Message-ID: <171934367519.21847.12248145136761974723@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-06-25 21:25:46) > On Thu, Mar 28, 2024 at 12:27:02AM +0100, Michael Niedermayer wrote: > > On Wed, Mar 27, 2024 at 08:39:17AM +0100, Anton Khirnov wrote: > > > 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. > > > > I dislike it too > > so what do we do about this ? About what? What is the actual problem that needs addressed? > any objections to apply this ? yes, FF_SANE_NB_CHANNELS is a hack that should be removed, not spread -- 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".