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 C4F4847065 for ; Tue, 25 Jul 2023 21:03:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6F16168C665; Wed, 26 Jul 2023 00:03:14 +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 0626368C2D0 for ; Wed, 26 Jul 2023 00:03:07 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 39A16240005 for ; Tue, 25 Jul 2023 21:03:06 +0000 (UTC) Date: Tue, 25 Jul 2023 23:03:06 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230725210306.GT7802@pb2> References: <20230725004609.17750-1-michael@niedermayer.cc> <20230725004609.17750-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/cbs_h266_syntax_template: Check num_subpic_cols for 0 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="===============4692033228647191996==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4692033228647191996== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7Ha3rcGc4ZVRbLT1" Content-Disposition: inline --7Ha3rcGc4ZVRbLT1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 24, 2023 at 10:54:20PM -0300, James Almer wrote: > On 7/24/2023 9:46 PM, Michael Niedermayer wrote: > > Fixes: division by zero > > Fixes: 60306/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fu= zzer-5538913553612800 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/cbs_h266_syntax_template.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h26= 6_syntax_template.c > > index dce0216fbc..18ecf17e3b 100644 > > --- a/libavcodec/cbs_h266_syntax_template.c > > +++ b/libavcodec/cbs_h266_syntax_template.c > > @@ -1187,6 +1187,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, = RWContext *rw, > > } else { > > int num_subpic_cols =3D tmp_width_val / > > (current->sps_subpic_width_minus= 1[0] + 1); > > + if (!num_subpic_cols) > > + return AVERROR_INVALIDDATA; > > infer(sps_subpic_ctu_top_left_x[i], > > (i % num_subpic_cols) * > > (current->sps_subpic_width_minus1[0] + 1)); >=20 > Does the following fix it too? yes, feel free to push this, or i can if you prefer? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control. --7Ha3rcGc4ZVRbLT1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZMA4gwAKCRBhHseHBAsP qxF1AJ95pY7xH66JI+58cSF/CRV3uYtHnQCfT5AvYhwR2uLE+nAe6ImkSKCY9pY= =p8i5 -----END PGP SIGNATURE----- --7Ha3rcGc4ZVRbLT1-- --===============4692033228647191996== 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". --===============4692033228647191996==--