mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
Fix demux_ty_FindESHeader so it won't overread
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24501 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
abfe1d69a1
commit
7ffd4426a3
@ -363,7 +363,7 @@ static int demux_ty_FindESHeader( unsigned char *header,
|
||||
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 ] &&
|
||||
|
Loading…
Reference in New Issue
Block a user