From 8833f7c4ce9d8f9bd8bd6edc98f3f84c3766a68d Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 10 Jul 2008 20:10:11 +0000 Subject: 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 --- libmpdemux/demux_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index 600c2b0321..c9f0dbbfe7 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -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) { -- cgit v1.2.3