aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-10 20:10:11 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-10 20:10:11 +0000
commit8833f7c4ce9d8f9bd8bd6edc98f3f84c3766a68d (patch)
treea41d292d8abbf4de414dd6040560945fdc281a2e
parent646838e4462f2cf72de0211cc9c5a1c5d2a9ebfc (diff)
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
-rw-r--r--libmpdemux/demux_audio.c2
1 files changed, 1 insertions, 1 deletions
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) {