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 8E9E140FBD for ; Mon, 14 Mar 2022 14:16:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A25F68AF3A; Mon, 14 Mar 2022 16:16:41 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 278B968A717 for ; Mon, 14 Mar 2022 16:16:35 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 4FA26FF80B for ; Mon, 14 Mar 2022 14:16:33 +0000 (UTC) Date: Mon, 14 Mar 2022 15:16:33 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220314141633.GZ2829255@pb2> References: <20220312235227.19626-1-michael@niedermayer.cc> <20220314140441.GY2829255@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/vp9_superframe_split_bsf: Check in size 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="===============2140281166778651285==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2140281166778651285== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/tgzoN73CXt3SHEY" Content-Disposition: inline --/tgzoN73CXt3SHEY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 14, 2022 at 11:07:38AM -0300, James Almer wrote: >=20 >=20 > On 3/14/2022 11:04 AM, Michael Niedermayer wrote: > > On Sun, Mar 13, 2022 at 04:03:42PM -0300, James Almer wrote: > > >=20 > > >=20 > > > On 3/12/2022 8:52 PM, Michael Niedermayer wrote: > > > > Fixes: Out of array read > > > > Fixes: 45137/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_SUPERFRA= ME_SPLIT_fuzzer-4984270639202304 > > > >=20 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-= fuzz/tree/master/projects/ffmpeg > > > > Signed-off-by: Michael Niedermayer > > > > --- > > > > libavcodec/vp9_superframe_split_bsf.c | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > >=20 > > > > diff --git a/libavcodec/vp9_superframe_split_bsf.c b/libavcodec/vp9= _superframe_split_bsf.c > > > > index ed0444561a..6af555c078 100644 > > > > --- a/libavcodec/vp9_superframe_split_bsf.c > > > > +++ b/libavcodec/vp9_superframe_split_bsf.c > > > > @@ -51,6 +51,11 @@ static int vp9_superframe_split_filter(AVBSFCont= ext *ctx, AVPacket *out) > > > > return ret; > > > > in =3D s->buffer_pkt; > > > > + if (in->size =3D=3D 0) { > > >=20 > > > !in->size > >=20 > > I favor checking "=3D=3D 0" when its about the value 0 and !X when its = about > > something being not set / not allocated. > > but i can change it if you prefer > >=20 > > thx >=20 > I suggested it for the sake of consistence. Most AVPacket.size checks use= !X > to check for 0. changed thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes --/tgzoN73CXt3SHEY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYi9OPQAKCRBhHseHBAsP q1/EAJjAkYX/QY1XUJvV4CWQdsdRVPu7AJ0QguFmtHjf7OWLzRfw4o+ROeKpvg== =A0V2 -----END PGP SIGNATURE----- --/tgzoN73CXt3SHEY-- --===============2140281166778651285== 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". --===============2140281166778651285==--