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 A232745045 for ; Sun, 23 Jun 2024 23:02:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EA1E068D636; Mon, 24 Jun 2024 02:01:48 +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 A306368CF50 for ; Mon, 24 Jun 2024 02:01:41 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 095C3C0004 for ; Sun, 23 Jun 2024 23:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1719183701; 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=dswMyev+Mz45bCxwL5GP9aGoSDpp0kCMVy2fVpNeBgg=; b=SwfeLiTEXJpP4vO4eZhA32SfxJUNgAp2W58Wc4aIF3rupB2op0BACL+OJg4IdnvS5uMRVg 5+0Y/jVpu/bAJEQr+oosYHDFoDHgyWpC6HqFEdDIQubB/e378gOa+5iZbGyp7WuXqTS37O h7ftS2I7oz49f19Of0d0rUJ65z9TQom3rYs1Vu5hSKx31cZKW+e48b/ndSZ4gK7eKd4zBE zSbqe0qSl/Tn1vyjUW/D1nucPe6baRuw4BTjF+d7dHm2Q8nJXpsMVOtMFrSlizV/w22X6g 3JgUmxCn18GM5oxqsdQT014PNtkNst+/c3bbb2Q1v4oXQd4M53YStQsCqysE7w== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 24 Jun 2024 01:01:35 +0200 Message-ID: <20240623230137.1749178-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240623230137.1749178-1-michael@niedermayer.cc> References: <20240623230137.1749178-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/hevc/hevcdec: SPS not set (or cleared) after frame start 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: NULL pointer dereference Fixes: 69623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6549698459009024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hevc/hevcdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index d68d454537a..4dd84d4953c 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -3180,6 +3180,9 @@ static int decode_slice(HEVCContext *s, const H2645NAL *nal, GetBitContext *gb) } else if (!s->cur_frame) { av_log(s->avctx, AV_LOG_ERROR, "First slice in a frame missing.\n"); return AVERROR_INVALIDDATA; + } else if (!s->ps.sps) { + av_log(s->avctx, AV_LOG_ERROR, "sps not set in slice.\n"); + return AVERROR_INVALIDDATA; } if (s->nal_unit_type != s->first_nal_type) { -- 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".