[vlc-commits] faad: Fix read buffer overflow

Hugo Beauzée-Luyssen git at videolan.org
Wed Aug 14 18:24:20 CEST 2019


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jul 30 14:07:34 2019 +0200| [ecf0b0f80e45be088806098079665a3aabbd7ad7] | committer: Hugo Beauzée-Luyssen

faad: Fix read buffer overflow

(cherry picked from commit 6388ee66cf50051be19da364a33f2145dafbae65)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ecf0b0f80e45be088806098079665a3aabbd7ad7
---

 modules/codec/faad.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index dae312b147..4352b48ea0 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -140,7 +140,8 @@ static int Open( vlc_object_t *p_this )
 
         if( NeAACDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
                            p_dec->fmt_in.i_extra,
-                           &i_rate, &i_channels ) < 0 )
+                           &i_rate, &i_channels ) < 0 ||
+                i_channels >= MPEG4_ASC_MAX_INDEXEDPOS )
         {
             msg_Err( p_dec, "Failed to initialize faad using extra data" );
             NeAACDecClose( p_sys->hfaad );



More information about the vlc-commits mailing list