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 4CF8447CC5 for ; Wed, 18 Oct 2023 00:49:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9763368CA13; Wed, 18 Oct 2023 03:49:45 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E426A68CA0F for ; Wed, 18 Oct 2023 03:49:37 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2714540002 for ; Wed, 18 Oct 2023 00:49:36 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 18 Oct 2023 02:49:35 +0200 Message-Id: <20231018004935.18309-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231018004935.18309-1-michael@niedermayer.cc> References: <20231018004935.18309-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc_ps: Dont leave invalid cpb_cnt_minus1 in the context 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 MIME-Version: 1.0 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: index 32 out of bounds for type 'uint32_t [32]' Fixes: 63003/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4685160840560640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index a6b64b92e3..f4365ef5b5 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -421,6 +421,7 @@ static int decode_hrd(GetBitContext *gb, int common_inf_present, if (hdr->cpb_cnt_minus1[i] > 31) { av_log(NULL, AV_LOG_ERROR, "nb_cpb %d invalid\n", hdr->cpb_cnt_minus1[i]); + hdr->cpb_cnt_minus1[i] = 0; return AVERROR_INVALIDDATA; } } -- 2.17.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".