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 0344E4A275 for ; Sat, 27 Apr 2024 18:23:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 99C5768D293; Sat, 27 Apr 2024 21:23:10 +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 25FDB68D22E for ; Sat, 27 Apr 2024 21:23:04 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3839AE0002 for ; Sat, 27 Apr 2024 18:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714242183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Bziz4U/mTG2pP44KPeIDaG6VD15+VO4azW2rBZzG0BA=; b=VO1/4uArrMmsD9BWI64xwZ7ML7jfhcsSADhS3pm1bqdHoXwZWGk9Q2tH9g7DMtWwn/nuWe 7KkyFp6c9O9//ubitHRXuDW26SXs6TDIOvKVdnEe4zaWqOjvE0wRKsTWglBfAMm5nTJrSj UbzeqxYGat7ZCyvc8EIXWdDF6ZE66HQ8VhWCA7ptBu0F+Fj5E8CWJCt/NYazk6Vi4bNCZE /vVpsKakAx+AwhmL0S8UVyX6y97G/wa425vk9mX0g3u82pA/mcTszf+gc0Fb8RbWjGkwx5 BrmFdFZ32idUyt/UfJB8j1bTSnwzxK++Agypp8KeelLmtoQZaVm+v4OVdPrN+w== Date: Sat, 27 Apr 2024 20:23:02 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240427182302.GI6420@pb2> References: <20240426235211.3718252-1-michael@niedermayer.cc> <20240426235211.3718252-4-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 4/5] avcodec/hevcdec: Check ref frame 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: multipart/mixed; boundary="===============4045513733528213372==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4045513733528213372== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+3d0b39I1dbubEDO" Content-Disposition: inline --+3d0b39I1dbubEDO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 27, 2024 at 12:14:18PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: NULL pointer dereferences > > Fixes: 68197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuz= zer-6382538823106560 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/hevcdec.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c > > index fcfb275f63a..92b0e45eee0 100644 > > --- a/libavcodec/hevcdec.c > > +++ b/libavcodec/hevcdec.c > > @@ -1969,13 +1969,13 @@ static void hls_prediction_unit(HEVCLocalContex= t *lc, int x0, int y0, > > =20 > > if (current_mv.pred_flag & PF_L0) { > > ref0 =3D refPicList[0].ref[current_mv.ref_idx[0]]; > > - if (!ref0 || !ref0->frame->data[0]) > > + if (!ref0 || !ref0->frame || !ref0->frame->data[0]) > > return; > > hevc_await_progress(s, ref0, ¤t_mv.mv[0], y0, nPbH); > > } > > if (current_mv.pred_flag & PF_L1) { > > ref1 =3D refPicList[1].ref[current_mv.ref_idx[1]]; > > - if (!ref1 || !ref1->frame->data[0]) > > + if (!ref1 || !ref1->frame || !ref1->frame->data[0]) > > return; > > hevc_await_progress(s, ref1, ¤t_mv.mv[1], y0, nPbH); > > } >=20 > Same as with 1/5: Checking for !ref0->frame is enough as HEVCFrame.f is > set if and only if the HEVCFrame.f->data[0] is set (with the possible will apply with this simplification thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad --+3d0b39I1dbubEDO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZi1ChgAKCRBhHseHBAsP qxowAJ4xI9SE+sC4Mj3hNq7REmU0u3Y9PQCfWLeahxkobUwL9iTYgbLOCp2zWTo= =aFrb -----END PGP SIGNATURE----- --+3d0b39I1dbubEDO-- --===============4045513733528213372== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============4045513733528213372==--