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 14D5444C64 for ; Thu, 12 Oct 2023 23:28:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ECCD568C9DB; Fri, 13 Oct 2023 02:28:06 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 059A368C76B for ; Fri, 13 Oct 2023 02:28:00 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 24D8CC0003 for ; Thu, 12 Oct 2023 23:27:59 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 13 Oct 2023 01:27:57 +0200 Message-Id: <20231012232759.5352-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/evc_ps: Check chroma_format_idc 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: out of array access Fixes: 62678/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4858264984354816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/evc_ps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c index c11b92d1c5..19895d404d 100644 --- a/libavcodec/evc_ps.c +++ b/libavcodec/evc_ps.c @@ -179,6 +179,10 @@ int ff_evc_parse_sps(GetBitContext *gb, EVCParamSets *ps) // 2 - 4:2:2 // 3 - 4:4:4 sps->chroma_format_idc = get_ue_golomb_31(gb); + if (sps->chroma_format_idc > 3) { + ret = AVERROR_INVALIDDATA; + goto fail; + } sps->pic_width_in_luma_samples = get_ue_golomb_long(gb); sps->pic_height_in_luma_samples = get_ue_golomb_long(gb); -- 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".