[vlc-commits] demux: ogg: fix int overflow on seek

Francois Cartegnie git at videolan.org
Mon Dec 9 14:16:39 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec  9 14:15:13 2013 +0100| [6c9aefac3282cbb1784d4dfa30b05dc46e6f43d0] | committer: Francois Cartegnie

demux: ogg: fix int overflow on seek

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

 modules/demux/ogg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 592b505..403dfae 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -683,7 +683,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             }
 
             assert( p_sys->i_length > 0 );
-            i64 = (mtime_t)(1000000.0 * p_sys->i_length * f );
+            i64 = INT64_C(1000000) * p_sys->i_length * f;
             Ogg_ResetStreamHelper( p_sys );
             if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, i64 ) >= 0 )
             {



More information about the vlc-commits mailing list