Fixed possible overflow in duration parsing.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 25 May 2007 19:25:25 +0000 (19:25 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 25 May 2007 19:25:25 +0000 (19:25 +0000)
modules/demux/playlist/m3u.c

index 8128dff..2f8c36d 100644 (file)
@@ -140,11 +140,11 @@ static int Demux( demux_t *p_demux )
                 /* Extended info */
                 psz_parse += sizeof("EXTINF:") - 1;
                 parseEXTINF( psz_parse, &psz_artist, &psz_name, &i_parsed_duration );
-                if ( i_parsed_duration >= 0 )
-                    i_duration = i_parsed_duration * 1000000;
-                if ( psz_name )
+                if( i_parsed_duration >= 0 )
+                    i_duration = i_parsed_duration * I64C(1000000);
+                if( psz_name )
                     psz_name = strdup( psz_name );
-                if ( psz_artist )
+                if( psz_artist )
                     psz_artist = strdup( psz_artist );
             }
             else if( !strncasecmp( psz_parse, "EXTVLCOPT:",