[MPlayer-cvslog] r27249 - trunk/libmpdemux/demux_audio.c

reimar subversion at mplayerhq.hu
Thu Jul 10 22:10:11 CEST 2008


Author: reimar
Date: Thu Jul 10 22:10:11 2008
New Revision: 27249

Log:
Only read wav header cbSize when there is enough space in header.


Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	(original)
+++ trunk/libmpdemux/demux_audio.c	Thu Jul 10 22:10:11 2008
@@ -390,7 +390,7 @@ static int demux_audio_open(demuxer_t* d
     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) {



More information about the MPlayer-cvslog mailing list