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 ACC944BADA for ; Wed, 23 Jul 2025 08:43:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2AA0368BB7E; Wed, 23 Jul 2025 11:43:40 +0300 (EEST) Received: from relay16.mail.gandi.net (relay16.mail.gandi.net [217.70.178.236]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 18E67687DB8 for ; Wed, 23 Jul 2025 11:43:34 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 532454388B for ; Wed, 23 Jul 2025 08:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1753260213; 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; bh=f12Gz7SHGQnGYKLGCtFC/kLj0JpEhlr4Fic3LIVGV7o=; b=N4e0+KBDyjB296Cx1j2cHJw9gARkvpqdhMzzUIbeiNko7XB6PV9G2cAjdxpah4l+edNF66 LLfStYl3Hhf4Pi6Pvz7UENkKA4mxp6Yq7kEOKkiYqp7+ob6+QvS7gH341SX/RlZeNXdGJf bk+YlVhShtkgxlT+PVoCzJmuVWTIY03BaG8JOsEJT4CYgXyRFU4CGbQFCWQpj7NdgYQLla 7gZRXHG3w5zEGaIOqfzjkmt3v03Bf6UxjUTmn8/cG2/h7A9mP8U1lP2j7qKXe3240jXssr 5XYzpWCcRD7TFgsq3NeZPdaX/sIYnYvPGdILrW7CiRY+Yo0qAZwx3MqE7SwsxA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 23 Jul 2025 10:43:32 +0200 Message-ID: <20250723084332.3650349-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejjeefvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepjeffueefffevvedthfeuvedtfeejteehieetffehteegvdduudevtdfffeejhfelnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg Subject: [FFmpeg-devel] [PATCH] avformat/asfdec_f: Check amount of value read 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: use of uninitialized memory Fixes: 403675492/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-4754281823797248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/asfdec_f.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index ea6e8ef4f3a..10f5dea57c3 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -241,7 +241,9 @@ static void get_tag(AVFormatContext *s, const char *key, int type, int len, int avio_get_str16le(s->pb, len, value, 2 * len + 1); break; case -1: // ASCI - avio_read(s->pb, value, len); + ;int ret = ffio_read_size(s->pb, value, len); + if (ret < 0) + goto finish; value[len]=0; break; case ASF_BYTE_ARRAY: -- 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".