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

reimar subversion at mplayerhq.hu
Sun Jun 29 09:34:44 CEST 2008


Author: reimar
Date: Sun Jun 29 09:34:44 2008
New Revision: 27143

Log:
Make sure we do not use uninitialized data in case of a short read.
Not really relevant but fixes bug #1109


Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	(original)
+++ trunk/libmpdemux/demux_audio.c	Sun Jun 29 09:34:44 2008
@@ -423,6 +423,7 @@ static int demux_audio_open(demuxer_t* d
     if((w->wFormatTag == 0x01) && (w->nChannels == 2) && (w->nSamplesPerSec == 44100)) {
 	unsigned char buf[16384]; // vlc uses 16384*4 (4 dts frames)
 	unsigned int i;
+	memset(buf, 0, sizeof(buf));
 	stream_read(s, buf, sizeof(buf));
 	for (i = 0; i < sizeof(buf) - 5; i += 2) {
 	    // DTS, 14 bit, LE



More information about the MPlayer-cvslog mailing list