[MPlayer-cvslog] r24501 - trunk/libmpdemux/demux_ty.c

reimar subversion at mplayerhq.hu
Fri Sep 14 22:09:39 CEST 2007


Author: reimar
Date: Fri Sep 14 22:09:39 2007
New Revision: 24501

Log:
Fix demux_ty_FindESHeader so it won't overread


Modified:
   trunk/libmpdemux/demux_ty.c

Modified: trunk/libmpdemux/demux_ty.c
==============================================================================
--- trunk/libmpdemux/demux_ty.c	(original)
+++ trunk/libmpdemux/demux_ty.c	Fri Sep 14 22:09:39 2007
@@ -363,7 +363,7 @@ static int demux_ty_FindESHeader( unsign
    unsigned char *buffer, int bufferSize )
 {
    int count;
-   for( count = 0 ; count < bufferSize ; count++ )
+   for( count = 0 ; count + 3 < bufferSize ; count++ )
    {
       if ( buffer[ count + 0 ] == header[ 0 ] &&
            buffer[ count + 1 ] == header[ 1 ] &&



More information about the MPlayer-cvslog mailing list