From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 702D44CA8A
	for <ffmpegdev@gitmailbox.com>; Sat, 25 Jan 2025 01:20:03 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0F27568B634;
	Sat, 25 Jan 2025 03:20:00 +0200 (EET)
Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net
 [217.70.183.201])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8CCC9689A1C
 for <ffmpeg-devel@ffmpeg.org>; Sat, 25 Jan 2025 03:19:53 +0200 (EET)
Received: by mail.gandi.net (Postfix) with ESMTPSA id D64AE1BF203
 for <ffmpeg-devel@ffmpeg.org>; Sat, 25 Jan 2025 01:19:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc;
 s=gm1; t=1737767993;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=a+L5QofPJZ2mT/lvkuWmL4+RtMJ8xGOdFdETs6kudYY=;
 b=hY2k0CnviciTJMkPexGCvl4kE335hYtCuT6V0n4lP5A6jdT3s74O2T8urVG8ormA0X8vdP
 DKOPjYOhRMzbrzQo6kRPdGYhEyAfrMHA+cC01A5I/2saGhs6jvxljNntl81u01IgFqTxBH
 WdeiIA9UqsTmY0BoPA4X0qAQyJLmelCXnFdkicVdXItEDBSAktmXrinOM2gPchlDlVrgqI
 TTKUNsaazuo41Z5BKnUyID0FLRhoPmGNsq3+TOGKHgZaIU7lBj6RrLGV9IFnATvKO4Lf4a
 3aaiV0howblACeat9tQP2DVZw32F2rhp7v33L1sTfllY9SJRekM/d/O+BZHE5g==
Date: Sat, 25 Jan 2025 02:19:52 +0100
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20250125011952.GG4991@pb2>
References: <20250121120005.509005-1-viraajraulgkar@gmail.com>
MIME-Version: 1.0
In-Reply-To: <20250121120005.509005-1-viraajraulgkar@gmail.com>
X-GND-Sasl: michael@niedermayer.cc
Subject: Re: [FFmpeg-devel] [PATCH] avformat/riffdec: remove invalid sample
 rate check
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: multipart/mixed; boundary="===============9196993105968729430=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250125011952.GG4991@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============9196993105968729430==
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="pIuZi0OuhMQktvfu"
Content-Disposition: inline


--pIuZi0OuhMQktvfu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi

On Tue, Jan 21, 2025 at 05:30:05PM +0530, Viraaj Raulgaonkar wrote:
> Sample rates up to 2^31 - 1 are considered valid, while greater values
> are invalid.  Removing the check potentially allows the sample rate
> to be decoded in all cases instead of halting demux for values
> greater than 2^31 - 1.
>=20
> Fixes Trac ticket #11361.
> ---
>  libavformat/riffdec.c | 5 -----
>  1 file changed, 5 deletions(-)
>=20
> diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
> index b7a85a6ab2..94dccb324e 100644
> --- a/libavformat/riffdec.c
> +++ b/libavformat/riffdec.c
> @@ -179,11 +179,6 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb,
> =20
>      par->bit_rate =3D bitrate;
> =20
> -    if (par->sample_rate <=3D 0) {
> -        av_log(logctx, AV_LOG_ERROR,
> -               "Invalid sample rate: %d\n", par->sample_rate);
> -        return AVERROR_INVALIDDATA;
> -    }

the API does not really allow negative sample rates

thx

[...]
--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB


--pIuZi0OuhMQktvfu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ5Q8NQAKCRBhHseHBAsP
q+bRAKCJgc+yLheTAx5tFlQem0a0Ia745gCgh6XHSPxsASCWdSGtfW6u3a7CMqI=
=ANzs
-----END PGP SIGNATURE-----

--pIuZi0OuhMQktvfu--

--===============9196993105968729430==
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".

--===============9196993105968729430==--