[vlc-commits] [Git][videolan/vlc][3.0.x] codec: faad2: check max number of supported channels

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 7 05:34:02 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
1966691a by François Cartegnie at 2026-09-07T05:10:05+00:00
codec: faad2: check max number of supported channels

fix #30073

(cherry picked from commit b86fb507ea51e19d5679644b7fd09b97b1d8104e)

- - - - -


1 changed file:

- modules/codec/faad.c


Changes:

=====================================
modules/codec/faad.c
=====================================
@@ -319,7 +319,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
                 FlushBuffer( p_sys, i_read );
         }
 
-        if( i_rate == 0 )
+        if( i_rate == 0 || i_channels >= MPEG4_ASC_MAX_INDEXEDPOS )
         {
             /* Can not init decoder at all for now */
             FlushBuffer( p_sys, SIZE_MAX );
@@ -388,7 +388,8 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
                 if( NeAACDecInit( hfaad,
                                   p_sys->p_block->p_buffer,
                                   p_sys->p_block->i_buffer,
-                                  &i_rate,&i_channels ) < 0 )
+                                  &i_rate,&i_channels ) < 0 ||
+                    i_channels >= MPEG4_ASC_MAX_INDEXEDPOS )
                 {
                     /* reinitialization failed */
                     NeAACDecClose( hfaad );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1966691ac9e2cac443fd86870884d99da43e6d41

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1966691ac9e2cac443fd86870884d99da43e6d41
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list