1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-21 02:41:13 +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:
reimar 2008-07-10 20:10:11 +00:00
parent 646838e446
commit 8833f7c4ce

View File

@ -390,7 +390,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
w->cbSize = 0;
sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec;
l -= 16;
if (l > 0) {
if (l >= 2) {
w->cbSize = FFMAX(stream_read_word_le(s), 0);
l -= 2;
if (l < w->cbSize) {