Commit 775a3048 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

asf: fix integer underflow

We substract 56 from the size later in the function.
parent 367795fb
......@@ -252,8 +252,8 @@ static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj )
unsigned int i;
/* We just ignore error on the index */
if( vlc_stream_Peek( s, &p_peek, p_index->i_object_size ) <
__MAX( (int64_t)p_index->i_object_size, 56 ) )
if( p_index->i_object_size < 56
|| vlc_stream_Peek( s, &p_peek, p_index->i_object_size ) < 56 )
return VLC_SUCCESS;
ASF_GetGUID( &p_index->i_file_id, p_peek + ASF_OBJECT_COMMON_SIZE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment