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 89EDC4C838 for ; Sat, 10 May 2025 14:36:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C56DA68CA09; Sat, 10 May 2025 17:36:21 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70F6B68C9D8 for ; Sat, 10 May 2025 17:36:12 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B406E41DF4 for ; Sat, 10 May 2025 14:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1746887771; 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=ZClRgakEp6NRAr4I0a4A9cBuGnQ7srfj23IVmjf7CBY=; b=R0qMvWniCh6TdT1wGpE+2C8CYblVGj9qpdsecJhiOhiBre2pw82oryzLhWQqmAWaTnfPls dCJohrI5/PyLKrNvxx+QiHTQjl9yLNJPZ/bAKWRWXqjQfepiqvIIUCGwWddI/8DJ8F5IVS EGKo5nG0dOyNJ7sAaBJ3VQk1Qc0uypjG1y7xzV6qfbfgs1eMNdO3ZkIwLsI/VGQWnVoKjZ q2AnF4V1pdNQwu4kYUCOGwQv0KUN8Uw7E+5DuezV71AUa03clnXJj31lw5HJjoiPthHd4H 1ruYmt9Y7VgWWEyFrFXzgd5KFE3/406lWJxgrSM2nX+Au0kw84Afgk1NLdUocQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 10 May 2025 16:36:08 +0200 Message-ID: <20250510143608.2309616-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250510143608.2309616-1-michael@niedermayer.cc> References: <20250510143608.2309616-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvleehjeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/3] avformat/iamf_parse: check space left for AAC 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: Assertion n>=0 && n<=32 failed at ./libavcodec/get_bits.h:406 Fixes: 398527871/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6602025714647040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iamf_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index abedfdb0668..37fb25962c4 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -304,6 +304,8 @@ static int update_extradata(AVCodecParameters *codecpar) skip_bits(&gb, 4); put_bits(&pb, 4, codecpar->ch_layout.nb_channels); // set channel config ret = put_bits_left(&pb); + if (ret < 0) + return AVERROR_INVALIDDATA; put_bits(&pb, ret, get_bits_long(&gb, ret)); flush_put_bits(&pb); -- 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".