On Tue, 10 Mar 2026, 16:27 Lynne via ffmpeg-devel, <[email protected]>
wrote:

> PR #22465 opened by Lynne
> URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22465
> Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22465.patch
>
>
> >From 733ccc414c690e170dcd36759f03db2dcab26bc1 Mon Sep 17 00:00:00 2001
> From: Lynne <[email protected]>
> Date: Tue, 10 Mar 2026 17:24:46 +0100
> Subject: [PATCH] aacdec_usac_mps212: reject reserved freq_res value
>
> ---
>  libavcodec/aac/aacdec_usac.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> index bb2f83cfa6..7356e3cc7d 100644
> --- a/libavcodec/aac/aacdec_usac.c
> +++ b/libavcodec/aac/aacdec_usac.c
> @@ -215,6 +215,9 @@ static int decode_usac_element_pair(AACDecContext *ac,
>
>      if (e->stereo_config_index) {
>          e->mps.freq_res = get_bits(gb, 3); /* bsFreqRes */
> +        if (!e->mps.freq_res)
> +            return AVERROR(EINVAL); /* value 0 is reserved */
> +
>          e->mps.fixed_gain = get_bits(gb, 3); /* bsFixedGainDMX */
>          e->mps.temp_shape_config = get_bits(gb, 2); /* bsTempShapeConfig
> */
>          e->mps.decorr_config = get_bits(gb, 2); /* bsDecorrConfig */
> --
> 2.52.0
>
> _______________________________________________
> ffmpeg-devel mailing list -- [email protected]
> To unsubscribe send an email to [email protected]


Does the spec say to fail on reserved values? Usually it tells you to
ignore them and continue.

Kieran

>
>
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to