[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.44,1.45

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Mar 8 14:07:39 CET 2006


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv13998

Modified Files:
	demux_audio.c 
Log Message:
"i < sizeof(buf)" must be "i < sizeof(buf) - 5", since later buf[i + 5] is used.


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- demux_audio.c	17 Feb 2006 01:57:40 -0000	1.44
+++ demux_audio.c	8 Mar 2006 13:07:36 -0000	1.45
@@ -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)) {




More information about the MPlayer-cvslog mailing list