[vlc-commits] AU: fix division by 0 with corrupted files
Jean-Baptiste Kempf
git at videolan.org
Mon Apr 2 06:36:11 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 2 05:32:33 2012 +0200| [bb222c8a9b0a4b89cfd6aa1ad230fe8bfdaa6c7b] | committer: Jean-Baptiste Kempf
AU: fix division by 0 with corrupted files
Reported by Marcin 'Icewall' Noga from Hispasec
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb222c8a9b0a4b89cfd6aa1ad230fe8bfdaa6c7b
---
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