Mercurial > mplayer.hg
changeset 17775:28c2108f1cfa
"i < sizeof(buf)" must be "i < sizeof(buf) - 5", since later buf[i + 5] is used.
author | reimar |
---|---|
date | Wed, 08 Mar 2006 13:07:36 +0000 |
parents | 30fa0638b78d |
children | 83159e21a639 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Wed Mar 08 13:00:51 2006 +0000 +++ b/libmpdemux/demux_audio.c Wed Mar 08 13:07:36 2006 +0000 @@ -312,7 +312,7 @@ unsigned char buf[16384]; // vlc uses 16384*4 (4 dts frames) unsigned int i; stream_read(s, buf, sizeof(buf)); - for (i = 0; i < sizeof(buf); i += 2) { + for (i = 0; i < sizeof(buf) - 5; i += 2) { // DTS, 14 bit, LE if((buf[i] == 0xff) && (buf[i+1] == 0x1f) && (buf[i+2] == 0x00) && (buf[i+3] == 0xe8) && ((buf[i+4] & 0xfe) == 0xf0) && (buf[i+5] == 0x07)) {