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 ED70D49A5A for ; Sat, 27 Apr 2024 18:14:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3A8D68D281; Sat, 27 Apr 2024 21:14:06 +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 AD35368C6D5 for ; Sat, 27 Apr 2024 21:14:00 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 161E440003 for ; Sat, 27 Apr 2024 18:13:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714241640; 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=Rtu8c7+a7TdlChPalByWXGPFvTTsuR9C6CeKS8l0ER4=; b=gqdJDxEXc9v6qZeCovUjRegRJwVkvIGu5kG5+y/KRwtd8sYLIv8AhCXSmioZhByxX/3Fye PfZJCoLWuCtKcUmb5ku1AXsLtzVOzMxvwioGVV3o+ii42xiBtENXakeio6ihfk7lkaPseW s+CcrYmrCQtk/h3dzdNolc/uKcG60+4ZBQSD+FpfCV8AgxfXqXR8Yg+S79QkvinuQ6PMLb 4YD19FJr8KbLpH8eb7EEb8C8XOTIC37djJbCOIM65/jc3tyqJjfHDbi1taP+bUG6H/H+Jd piUoIowDmmVFnABtExv78v0LhkEzZqgp71z3TNNBQYjUXG2xeD07iN7G+zLG1A== Date: Sat, 27 Apr 2024 20:13:58 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240427181358.GF6420@pb2> References: <20240426235211.3718252-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/5] avcodec/pngdec: Check last AVFrame before deref 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="===============8512765039621923080==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8512765039621923080== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JYPRrStzzjYzUT0Y" Content-Disposition: inline --JYPRrStzzjYzUT0Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 27, 2024 at 11:36:30AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: NULL pointer dereference > > Fixes: 68184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuz= zer-4926478069334016 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/pngdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c > > index f7751223b81..b24bfa248dc 100644 > > --- a/libavcodec/pngdec.c > > +++ b/libavcodec/pngdec.c > > @@ -1218,7 +1218,7 @@ static int decode_fctl_chunk(AVCodecContext *avct= x, PNGDecContext *s, > > return AVERROR_INVALIDDATA; > > } > > =20 > > - if ((sequence_number =3D=3D 0 || !s->last_picture.f->data[0]) && > > + if ((sequence_number =3D=3D 0 || !s->last_picture.f || !s->last_pi= cture.f->data[0]) && > > dispose_op =3D=3D APNG_DISPOSE_OP_PREVIOUS) { > > // No previous frame to revert to for the first frame > > // Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND >=20 > Just checking for !s->last_picture.f is enough -- s->last_picture.f is > set if and only if s->last_picture.f->data[0] is set. ok will apply with that simplified thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is a danger to trust the dream we wish for rather than the science we have, -- Dr. Kenneth Brown --JYPRrStzzjYzUT0Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZi1AZgAKCRBhHseHBAsP q7mHAJwK2HZbX++1GnlUqxaRnzfH2Np76gCggsIz/ZjVeA+rTWKdcc3A1JiPSWY= =kE2E -----END PGP SIGNATURE----- --JYPRrStzzjYzUT0Y-- --===============8512765039621923080== 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". --===============8512765039621923080==--