aacdec_usac: fix off by one error check on channel numbers

This commit is contained in:
Lynne 2024-06-02 23:52:59 +02:00
parent 0d93e04bc6
commit f4371029f8
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -359,7 +359,7 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
if (!channel_config_idx) {
/* UsacChannelConfig() */
nb_channels = get_escaped_value(gb, 5, 8, 16); /* numOutChannels */
if (nb_channels >= 64)
if (nb_channels > 64)
return AVERROR(EINVAL);
av_channel_layout_uninit(&ac->oc[1].ch_layout);