asf: Reject streams with invalid entry time interval
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 2 Aug 2019 12:02:44 +0000 (14:02 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Wed, 14 Aug 2019 12:03:49 +0000 (14:03 +0200)
CVE-2019-14535

modules/demux/asf/libasf.c

index c2510f6..d949c48 100644 (file)
@@ -276,6 +276,12 @@ static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj )
 #endif
 
     /* Sanity checking */
+    if( !p_index->i_index_entry_time_interval )
+    {
+        /* We can't use this index if it has an invalid time interval */
+        p_index->i_index_entry_count = 0;
+        return VLC_ENOMEM;
+    }
     if( p_index->i_index_entry_count > (p_index->i_object_size - 56) / 6 )
         p_index->i_index_entry_count = (p_index->i_object_size - 56) / 6;