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 EBD1B49CD7 for ; Fri, 20 Jun 2025 00:33:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6669E68DB05; Fri, 20 Jun 2025 03:33:06 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8B14C68DAC1 for ; Fri, 20 Jun 2025 03:32:58 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D59DD43B17 for ; Fri, 20 Jun 2025 00:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750379578; 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=NZH0Y5A6+EXwKxX8UmCGtknSUlyJIUdQ3PGoSb96ke4=; b=eTadeU/RpRkShAAi0ofOadoqXmwEeGOcAVLBFjDc9p84Fw2SFTMm/44Tdoslo0X+DcmdSS /hhsplVoWsczcGcwtS62C+ZHhu/kZEe5yEOzu0QlYbs/JaAHhauFQ8vK/J8OJVQ5tEnkZT BWqHRfv7Ed4NuKQmjU66AFw1MTR5ks0Ssd4Mb00wmduBlrffw72XpezrEP0bseQsaSsg23 PoovCrqbAZp1EDuPyS0Urm952f4ubBhFfMs4RhWvlp5iHoiRMp552PUtw8dtOQhaOtYrqg TvftahhJxMGiySYXwJfsoZI4McFE65SRaRbOpw+KcRYupP1bVERnJp1C18jqsg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 20 Jun 2025 02:32:49 +0200 Message-ID: <20250620003255.295598-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620003255.295598-1-michael@niedermayer.cc> References: <20250620003255.295598-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdeileejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/8] avcodec/hcadec: Check sample_rate 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: AVERROR_BUG return Fixes: 413997604/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5188382613635072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hcadec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c index 7780372cf3f..161044bfbcc 100644 --- a/libavcodec/hcadec.c +++ b/libavcodec/hcadec.c @@ -179,6 +179,9 @@ static void ath_init1(uint8_t *ath, int sample_rate) static int ath_init(uint8_t *ath, int type, int sample_rate) { + if (sample_rate <= 0) + return AVERROR_INVALIDDATA; + switch (type) { case 0: /* nothing to do */ -- 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".