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 15FB043505 for ; Thu, 14 Jul 2022 18:11:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D8B9668BA78; Thu, 14 Jul 2022 21:11:40 +0300 (EEST) 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 0768268BA5A for ; Thu, 14 Jul 2022 21:11:33 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 30254FF803 for ; Thu, 14 Jul 2022 18:11:32 +0000 (UTC) Date: Thu, 14 Jul 2022 20:11:31 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220714181131.GE2088045@pb2> References: <20220712184322.22814-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/3] avcodec/lagarith: Check dst/src in zero run code 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="===============5590690738997002999==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5590690738997002999== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="imjhCm/Pyz7Rq5F2" Content-Disposition: inline --imjhCm/Pyz7Rq5F2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 13, 2022 at 09:49:05AM +0200, Paul B Mahol wrote: > On Tue, Jul 12, 2022 at 8:43 PM Michael Niedermayer > wrote: >=20 > > Fixes: out of array access > > Fixes: > > 48799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer= -4764457825337344 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by > > : > > Michael Niedermayer > > --- > > libavcodec/lagarith.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c > > index 3aeb1c8a99..00e8005222 100644 > > --- a/libavcodec/lagarith.c > > +++ b/libavcodec/lagarith.c > > @@ -409,6 +409,9 @@ output_zeros: > > if (zero_run) { > > zero_run =3D 0; > > i +=3D esc_count; > > + if (i > end - dst || > > + i >=3D src_end - src) > > + return AVERROR_INVALIDDATA; > > memcpy(dst, src, i); > > dst +=3D i; > > l->zeros_rem =3D lag_calc_zero_run(src[i]); > > >=20 > LGTM will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry. --imjhCm/Pyz7Rq5F2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYtBcUwAKCRBhHseHBAsP q/siAJ4mTSrFWEFwCWVh/xTqY+ew7+VHKwCfR/5vMEbjec8Rq/f/T3YUGgi9qGc= =OuPU -----END PGP SIGNATURE----- --imjhCm/Pyz7Rq5F2-- --===============5590690738997002999== 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". --===============5590690738997002999==--