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 84F1E43E22 for ; Mon, 15 Aug 2022 20:25:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4960E68B92F; Mon, 15 Aug 2022 23:25:32 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C0E0468B5A4 for ; Mon, 15 Aug 2022 23:25:25 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id E9530240008 for ; Mon, 15 Aug 2022 20:25:24 +0000 (UTC) Date: Mon, 15 Aug 2022 22:25:23 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220815202523.GT2088045@pb2> References: <20220815175927.8743-1-michael@niedermayer.cc> <20220815175927.8743-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 3/4] avcodec/h263dec: Sanity check against minimal I/P frame 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="===============1700214426807247595==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1700214426807247595== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oaK9NA/DDdTag9m3" Content-Disposition: inline --oaK9NA/DDdTag9m3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 15, 2022 at 09:04:09PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: Timeout > > Fixes: 49718/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fu= zzer-4874987894341632 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/h263dec.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c > > index 8db0eccd89..c03a55a4fd 100644 > > --- a/libavcodec/h263dec.c > > +++ b/libavcodec/h263dec.c > > @@ -553,6 +553,8 @@ retry: > > avctx->has_b_frames =3D !s->low_delay; > > =20 > > if (CONFIG_MPEG4_DECODER && avctx->codec_id =3D=3D AV_CODEC_ID_MPE= G4) { > > + if (s->pict_type !=3D AV_PICTURE_TYPE_B && s->mb_num/2 > get_b= its_count(&s->gb)) > > + return AVERROR_INVALIDDATA; > > if (ff_mpeg4_workaround_bugs(avctx) =3D=3D 1) > > goto retry; > > if (s->studio_profile !=3D (s->idsp.idct =3D=3D NULL)) >=20 > Is it possible that you wanted to use get_bits_left() here? yes=20 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides --oaK9NA/DDdTag9m3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYvqrrwAKCRBhHseHBAsP q2dNAJwOfgqVFgvky+eEe1bV0JCjnZ6L7ACeLCzc5l/j1NMJ413LRWzrvCux1eg= =A/Wu -----END PGP SIGNATURE----- --oaK9NA/DDdTag9m3-- --===============1700214426807247595== 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". --===============1700214426807247595==--