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 ESMTP id 5614B4BC0B for ; Wed, 14 Aug 2024 22:37:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 08C1168DB57; Thu, 15 Aug 2024 01:37:28 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7509E68D9D5 for ; Thu, 15 Aug 2024 01:37:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id CB5B9E0003 for ; Wed, 14 Aug 2024 22:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723675038; 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=fOdstOVis5Fj4QM5S6FT6f8dZ+1I6vJPt0R+PtcGFDo=; b=Xr5D8y0NMckMgV+xpJ1B9YPJko82SHTSfOoqmT9CdKa4RZnofT2RU/MY+A3h1tsBGjbMCQ v3Nc4Gdopw4+otdQHwUaxKKH3plRfBYHElA4GJ5gZAA4cMJDP1PH1Q4iCB8UlvU3K1TXQs cYZoeq/v6JxTb5xIQBwYFhRsVWG/ITAdZ8yptsHBJgtLvdKsKoQKn1pIYJxzvWu4gjNLl3 W+7DEA5dL3J6cy9ZPxRMquAsUHu9pz5YN9eocODEgST/5T0E6q/X8PlWhM3qpDKMRG/GBN 9TR+F4izcIfVuilwswk0ajSd1NXNyuues4+kRVtI1tTBrBMdAnwbUpG4nO6JYA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 15 Aug 2024 00:37:05 +0200 Message-ID: <20240814223714.2436993-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240814223714.2436993-1-michael@niedermayer.cc> References: <20240814223714.2436993-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/5] avformat/mvdec: Check if name was 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 value Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mvdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 0718f0483a7..c045d2c7c8e 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -256,7 +256,8 @@ static int read_table(AVFormatContext *avctx, AVStream *st, if (avio_feof(pb)) return AVERROR_EOF; - avio_read(pb, name, 16); + if (avio_read(pb, name, 16) != 16) + return AVERROR_INVALIDDATA; name[sizeof(name) - 1] = 0; size = avio_rb32(pb); if (size < 0) { -- 2.45.2 _______________________________________________ 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".