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

wav: fix integer underflow

(cherry picked from commit 105335dd73917555335c03460aaa67fcdb9d4a55)
parent 3de60bf5
...@@ -178,7 +178,9 @@ static int Open( vlc_object_t * p_this ) ...@@ -178,7 +178,9 @@ static int Open( vlc_object_t * p_this )
/* see the following link for more information: /* see the following link for more information:
* http://www.microsoft.com/whdc/device/audio/multichaud.mspx#EFAA */ * http://www.microsoft.com/whdc/device/audio/multichaud.mspx#EFAA */
if( GetWLE( &p_wf->wFormatTag ) == WAVE_FORMAT_EXTENSIBLE && 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; unsigned i, i_channel_mask;
GUID guid_subformat; 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