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 1AE1B4BB55 for ; Wed, 23 Jul 2025 11:46:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EBDBB68D7F5; Wed, 23 Jul 2025 14:45:55 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 0306E68D7B4 for ; Wed, 23 Jul 2025 14:45:44 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6396843A0D for ; Wed, 23 Jul 2025 11:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1753271144; 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=wJrQz67u4qtPx5XnWdQ0/3z7A9y61gixU0Zmnztgb9Y=; b=jmNDXDCAzHGtDtEI87H5BySblLtaWySXmsa/PGtiMcEEJM5DYwJUktLqlqbx4Bc5C5FMVx avMkvJZXmS+UJnGz8NsYHHwQ7eIrew2Lm1Pmj4mmt7Y9NXLw12ZfGxamF3gGFrNUbOCyNA U4BTgzbA1sBr3+Etupj2XO34iWBHzFL6Q8rasGtuDqCiARhZ31LzeKFL7UXzD9lPGao81v H7jBE85EIKolaHl980z3tQf9TubHDP0SG0vSh1RrSUqXZsebadn0mMOG7e8SVXf7JjW6nc JxQDfrubtjOmd6GM6BJCp5AHXhBQW5KcNZD4T1KrnVcFztQ2mqm3wJC6B4xhiw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 23 Jul 2025 13:45:40 +0200 Message-ID: <20250723114540.151693-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250723114540.151693-1-michael@niedermayer.cc> References: <20250723114540.151693-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejjeeilecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/4] avformat/vqf: Ensure that comm_chunk is fully 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: 412125811/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-6253774274887680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/vqf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/vqf.c b/libavformat/vqf.c index 053720ea22f..fb668c16da3 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -144,7 +144,9 @@ static int vqf_read_header(AVFormatContext *s) if (len < 12) return AVERROR_INVALIDDATA; - avio_read(s->pb, comm_chunk, 12); + ret = ffio_read_size(s->pb, comm_chunk, 12); + if (ret < 0) + return ret; st->codecpar->ch_layout.nb_channels = AV_RB32(comm_chunk) + 1; read_bitrate = AV_RB32(comm_chunk + 4); rate_flag = AV_RB32(comm_chunk + 8); -- 2.50.1 _______________________________________________ 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".