Commit 19c07a54 authored by Laurent Aimar's avatar Laurent Aimar Committed by Rémi Denis-Courmont

Fixed segfault on corrupted wav file.

(cherry picked from commit a11cc336)
Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent cbc6c0b8
...@@ -169,7 +169,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -169,7 +169,8 @@ static int Open( vlc_object_t * p_this )
p_sys->fmt.audio.i_blockalign = GetWLE( &p_wf->nBlockAlign ); p_sys->fmt.audio.i_blockalign = GetWLE( &p_wf->nBlockAlign );
p_sys->fmt.i_bitrate = GetDWLE( &p_wf->nAvgBytesPerSec ) * 8; p_sys->fmt.i_bitrate = GetDWLE( &p_wf->nAvgBytesPerSec ) * 8;
p_sys->fmt.audio.i_bitspersample = GetWLE( &p_wf->wBitsPerSample ); p_sys->fmt.audio.i_bitspersample = GetWLE( &p_wf->wBitsPerSample );
p_sys->fmt.i_extra = GetWLE( &p_wf->cbSize ); if( i_size >= sizeof(WAVEFORMATEX) )
p_sys->fmt.i_extra = __MIN( GetWLE( &p_wf->cbSize ), i_size - sizeof(WAVEFORMATEX) );
i_extended = 0; i_extended = 0;
/* Handle new WAVE_FORMAT_EXTENSIBLE wav files */ /* Handle new WAVE_FORMAT_EXTENSIBLE wav files */
......
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