[vlc-commits] VorbisChapter: prevent overflow
Jean-Baptiste Kempf
git at videolan.org
Sat Sep 7 22:35:09 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Sep 7 22:34:09 2013 +0200| [0f93aae701dc25657e206d9d776c5f949d142acb] | committer: Jean-Baptiste Kempf
VorbisChapter: prevent overflow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f93aae701dc25657e206d9d776c5f949d142acb
---
modules/demux/xiph_metadata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/xiph_metadata.c b/modules/demux/xiph_metadata.c
index 46543ab..58b1da4 100644
--- a/modules/demux/xiph_metadata.c
+++ b/modules/demux/xiph_metadata.c
@@ -280,7 +280,7 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
if( sscanf( p, "%d:%d:%d.%d", &h, &m, &s, &ms ) == 4 )
{
sk = vlc_seekpoint_New();
- sk->i_time_offset = ((h * 3600 + m * 60 + s) *1000 + ms) * 1000;
+ sk->i_time_offset = (((int64_t)h * 3600 + (int64_t)m * 60 + (int64_t)s) * 1000 + ms) * 1000;
TAB_APPEND_CAST( (seekpoint_t**), *i_seekpoint, *ppp_seekpoint, sk );
}
}
More information about the vlc-commits
mailing list