mirror of
https://github.com/mpv-player/mpv
synced 2025-04-18 13:16:43 +00:00
Only read wav header cbSize when there is enough space in header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27249 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
646838e446
commit
8833f7c4ce
@ -390,7 +390,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
|
|||||||
w->cbSize = 0;
|
w->cbSize = 0;
|
||||||
sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec;
|
sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec;
|
||||||
l -= 16;
|
l -= 16;
|
||||||
if (l > 0) {
|
if (l >= 2) {
|
||||||
w->cbSize = FFMAX(stream_read_word_le(s), 0);
|
w->cbSize = FFMAX(stream_read_word_le(s), 0);
|
||||||
l -= 2;
|
l -= 2;
|
||||||
if (l < w->cbSize) {
|
if (l < w->cbSize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user