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 7C7BB46BBA for ; Sat, 5 Aug 2023 15:53:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 376BC68C66D; Sat, 5 Aug 2023 18:53:05 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E0F1768C301 for ; Sat, 5 Aug 2023 18:52:57 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D23C82000B for ; Sat, 5 Aug 2023 15:52:56 +0000 (UTC) Date: Sat, 5 Aug 2023 17:52:56 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230805155256.GR7802@pb2> References: <20230802000135.26482-1-michael@niedermayer.cc> <20230802000135.26482-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/3] avcodec/jpeg2000htdec: Consolidate jpeg2000 spec bits in jpeg2000_bitbuf_refill_backwards() 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="===============3863552709831315010==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3863552709831315010== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iks5JP/frMpeeVyh" Content-Disposition: inline --iks5JP/frMpeeVyh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 04, 2023 at 06:41:24PM -0700, Pierre-Anthony Lemieux wrote: > On Tue, Aug 1, 2023 at 5:02=E2=80=AFPM Michael Niedermayer > wrote: > > > > Code should make more sense now > > > > Fixes: out of array access > > Fixes: 58299/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000= _fuzzer-6627570448465920 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/jpeg2000htdec.c | 13 +++---------- > > 1 file changed, 3 insertions(+), 10 deletions(-) > > > > diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c > > index 2b082b3b2f..3985783f3a 100644 > > --- a/libavcodec/jpeg2000htdec.c > > +++ b/libavcodec/jpeg2000htdec.c > > @@ -159,21 +159,14 @@ static int jpeg2000_bitbuf_refill_backwards(State= Vars *buffer, const uint8_t *ar > > */ > > position -=3D 4; >=20 > Can't we get rid of this line and the comment above, and instead > replace `int32_t position =3D buffer->pos;` with `int32_t position =3D > buffer->pos - 4;`? yes >=20 > LGTM otherwise. will apply with the suggested change 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 --iks5JP/frMpeeVyh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZM5wVAAKCRBhHseHBAsP qydeAJ4nZPgY5rOM7nNkqsMeN0DCjxD8wgCfZthVWh3Y+cyNTY/vREwHswM09OI= =KjQi -----END PGP SIGNATURE----- --iks5JP/frMpeeVyh-- --===============3863552709831315010== 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". --===============3863552709831315010==--