Mercurial > mplayer.hg
changeset 27111:4899f42d1c94
Make sure we do not use uninitialized data in case of a short read.
Not really relevant but fixes bug #1109
author | reimar |
---|---|
date | Sun, 29 Jun 2008 07:34:44 +0000 |
parents | f83be44e1faf |
children | cd61e85bb657 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Sun Jun 29 07:25:47 2008 +0000 +++ b/libmpdemux/demux_audio.c Sun Jun 29 07:34:44 2008 +0000 @@ -423,6 +423,7 @@ 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