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 523434389D for ; Sat, 2 Jul 2022 14:30:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 92A5268B878; Sat, 2 Jul 2022 17:30:04 +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 88BD268B85A for ; Sat, 2 Jul 2022 17:29:58 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id CCFD4240005 for ; Sat, 2 Jul 2022 14:29:57 +0000 (UTC) Date: Sat, 2 Jul 2022 16:29:56 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220702142956.GD396728@pb2> References: <20220701192553.12538-1-michael@niedermayer.cc> <66a06af2-978e-6152-f0a9-505e842493b8@gmail.com> MIME-Version: 1.0 In-Reply-To: <66a06af2-978e-6152-f0a9-505e842493b8@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH 1/2] avutil/channel_layout: av_channel_layout_describe_bprint: Check for buffer end 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="===============0520923512217897919==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0520923512217897919== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="o3cUCUqY4mIAD/Uw" Content-Disposition: inline --o3cUCUqY4mIAD/Uw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 01, 2022 at 04:30:57PM -0300, James Almer wrote: > On 7/1/2022 4:25 PM, Michael Niedermayer wrote: > > Fixes: Timeout printing a billion channels > > Fixes: 48099/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-= 6754782204788736 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavutil/channel_layout.c | 4 ++++ > > 1 file changed, 4 insertions(+) > >=20 > > diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c > > index 21b70173b7..72969eff14 100644 > > --- a/libavutil/channel_layout.c > > +++ b/libavutil/channel_layout.c > > @@ -757,6 +757,10 @@ int av_channel_layout_describe_bprint(const AVChan= nelLayout *channel_layout, > > if (channel_layout->order =3D=3D AV_CHANNEL_ORDER_CUSTOM = && > > channel_layout->u.map[i].name[0]) > > av_bprintf(bp, "@%s", channel_layout->u.map[i].name); > > + > > + if (!av_bprint_is_complete(bp)) > > + return AVERROR(EINVAL); >=20 > Should be ENOMEM. >=20 > LGTM with that change. will changa and apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything ms did were stupid they would be bankrupt already. --o3cUCUqY4mIAD/Uw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYsBWYAAKCRBhHseHBAsP q8gEAKCDy5Wq0LU/Zrhoi4oaIDxCVEe0EgCeN5zM86kaS95ck/v42U+ji9F1K48= =X4cL -----END PGP SIGNATURE----- --o3cUCUqY4mIAD/Uw-- --===============0520923512217897919== 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". --===============0520923512217897919==--