diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-06-29 07:34:44 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-06-29 07:34:44 +0000 |
commit | 2293c795210e1bdb7d75ecc73d418fd33da1a64e (patch) | |
tree | d25da84e8536e13b02d67d0e7955ceaaf2b1c0eb /libmpdemux | |
parent | d5e01cffea2b0f9cd0fcfae3bf5b98b868589cc0 (diff) |
Make sure we do not use uninitialized data in case of a short read.
Not really relevant but fixes bug #1109
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27143 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index d1717c791e..269fa23539 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -423,6 +423,7 @@ static int demux_audio_open(demuxer_t* demuxer) { 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 |