[vlc-commits] AU: fix division by 0 with corrupted files
Jean-Baptiste Kempf
git at videolan.org
Mon Apr 2 17:09:33 CEST 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 2 05:32:33 2012 +0200| [21f68b9921e84235a8f80f9dc3ac81c520376a6b] | 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-2.0.git/?a=commit;h=21f68b9921e84235a8f80f9dc3ac81c520376a6b
---
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