changeset 24481:61222a7b1dbd

Fix demux_ty_FindESHeader so it won't overread
author reimar
date Fri, 14 Sep 2007 20:09:39 +0000
parents a365d70938b3
children e5eb9ccd6679
files libmpdemux/demux_ty.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Fri Sep 14 20:08:42 2007 +0000
+++ b/libmpdemux/demux_ty.c	Fri Sep 14 20:09:39 2007 +0000
@@ -363,7 +363,7 @@
    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 ] &&