[vlc-devel] commit: TTA: potential 0 divider ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Aug 21 17:12:42 CEST 2008
vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Aug 20 23:06:32 2008 +0300| [c162cadb1a77262c72a181c7514f9d79b5946c46] | committer: Rémi Denis-Courmont
TTA: potential 0 divider
(cherry picked from commit f789b29e0730f8c8e288517d1bd7956a8cfbb214)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c162cadb1a77262c72a181c7514f9d79b5946c46
---
modules/demux/tta.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/demux/tta.c b/modules/demux/tta.c
index e400908..47f83a4 100644
--- a/modules/demux/tta.c
+++ b/modules/demux/tta.c
@@ -111,6 +111,11 @@ static int Open( vlc_object_t * p_this )
fmt.audio.i_channels = GetWLE( &p_header[6] );
fmt.audio.i_bitspersample = GetWLE( &p_header[8] );
fmt.audio.i_rate = GetDWLE( &p_header[10] );
+ if( fmt.audio.i_rate == 0 )
+ {
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
p_sys->i_datalength = GetDWLE( &p_header[14] );
p_sys->i_framelength = TTA_FRAMETIME * fmt.audio.i_rate;
More information about the vlc-devel
mailing list