Commit 105335dd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

wav: fix integer underflow

parent 95e2f0ff
......@@ -176,7 +176,9 @@ static int Open( vlc_object_t * p_this )
/* see the following link for more information:
* http://www.microsoft.com/whdc/device/audio/multichaud.mspx#EFAA */
if( GetWLE( &p_wf->wFormatTag ) == WAVE_FORMAT_EXTENSIBLE &&
i_size >= sizeof( WAVEFORMATEXTENSIBLE ) )
i_size >= sizeof( WAVEFORMATEXTENSIBLE ) &&
( p_sys->fmt.i_extra + sizeof( WAVEFORMATEX )
>= sizeof( WAVEFORMATEXTENSIBLE ) ) )
{
unsigned i, i_channel_mask;
GUID guid_subformat;
......
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