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 9BAA14C896 for ; Sun, 11 May 2025 00:34:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9C44768C22A; Sun, 11 May 2025 03:33:00 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E52B068B3F9 for ; Sun, 11 May 2025 03:32:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 33FF34383D for ; Sun, 11 May 2025 00:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1746923572; 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=6FdSfcw1qoesvH41ebrmFb7276MdW8bxgTmXJgFeQY4=; b=HvoCxK2IAgIq3YmDwTPBel+pKzAbPLlaSpEckNn6RkA0/NWWwXcFS3H7+i62NbebUlnhb2 YWgWrQ1AttZ+lUA9Y4FdJez6Uq95jaDPmTeOcKKXhE/AlsLPvM5uo46APkhnWHCGrhrLdG IC+9EdiwW6z8VF8Een7qnVIqz4Xm5Lx5W8QttoeNPbrfQ9v997acRDEZF7fzKLjKoSiCrw CfyADrd19rb+K++XBEDblxxUo0Qv2yQLvTuqSBQYlYbJ1znX2QDoB9GMKIJ4GQoPBpop3k DHW38anPoNjAcS8WoXifIcpcwP/WFOetggE8hL2f85CDeTHkd+85aIgBOm3ZTQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 11 May 2025 02:32:43 +0200 Message-ID: <20250511003245.413345-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250511003245.413345-1-michael@niedermayer.cc> References: <20250511003245.413345-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvleeileehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/8] avcodec/sonic: Check num_taps 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: The encoder uses max 128 taps, which is quiet a lot already If work is done to improve sonic, it will be more radical than changing the taps Fixes: Timeout Fixes: 402539974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-6122944271286272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 60b077de47d..8b1d092ec91 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -924,6 +924,9 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) if (get_bits1(&gb)) // XXX FIXME av_log(avctx, AV_LOG_INFO, "Custom quant table\n"); + if (s->num_taps > 128) + return AVERROR_INVALIDDATA; + s->block_align = 2048LL*s->samplerate/(44100*s->downsampling); s->frame_size = s->channels*s->block_align*s->downsampling; // avctx->frame_size = s->block_align; -- 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".