[vlc-commits] AU: fix division by 0 with corrupted files

Jean-Baptiste Kempf git at videolan.org
Mon Apr 2 17:09:50 CEST 2012


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr  2 05:32:33 2012 +0200| [936628fe662e14c7e8c26090ba5201055bae8581] | committer: Jean-Baptiste Kempf

AU: fix division by 0 with corrupted files

Reported by Marcin 'Icewall' Noga from Hispasec
(cherry picked from commit bb222c8a9b0a4b89cfd6aa1ad230fe8bfdaa6c7b)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=936628fe662e14c7e8c26090ba5201055bae8581
---

 modules/demux/au.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/demux/au.c b/modules/demux/au.c
index 1efd2d0..11946a8 100644
--- a/modules/demux/au.c
+++ b/modules/demux/au.c
@@ -261,6 +261,13 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    if( p_sys->fmt.audio.i_rate == 0 )
+    {
+        msg_Err( p_demux, "invalid samplerate: 0" );
+        free( p_sys );
+        return VLC_EGENERIC;
+    }
+
     /* add the es */
     p_sys->es = es_out_Add( p_demux->out, &p_sys->fmt );
 



More information about the vlc-commits mailing list