summaryrefslogtreecommitdiffstats
path: root/src/file_mpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-10-31 17:51:21 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-10-31 17:51:21 +0100
commit3167cafd501512eac6e4a7b463cc8a4a25fc0367 (patch)
tree9816ce057845b73c650178b8001b2b78ffe3e2ea /src/file_mpg.c
parent7da26dcb1639efd9937dc1c53949f40128fd1dfc (diff)
Restrict variable context
Diffstat (limited to 'src/file_mpg.c')
-rw-r--r--src/file_mpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_mpg.c b/src/file_mpg.c
index d1d84f7..322a241 100644
--- a/src/file_mpg.c
+++ b/src/file_mpg.c
@@ -157,7 +157,6 @@ static int data_check_mpg(const unsigned char *buffer, const unsigned int buffer
{
const unsigned char padding_iso_end[8]= {0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0xB9};
const unsigned char sequence_end_iso_end[8]={0x00, 0x00, 0x01, 0xB7, 0x00, 0x00, 0x01, 0xB9};
- unsigned int i;
/* search padding + end code */
if(buffer_size>=8 && memcmp(&buffer[buffer_size/2-4], padding_iso_end, sizeof(padding_iso_end))==0)
{
@@ -167,6 +166,7 @@ static int data_check_mpg(const unsigned char *buffer, const unsigned int buffer
/* search video sequence end followed by iso end code*/
if(buffer_size>=14)
{
+ unsigned int i;
for(i=buffer_size/2-7; i<buffer_size-7; i++)
{
if(buffer[i]==0x00 && memcmp(&buffer[i], sequence_end_iso_end, sizeof(sequence_end_iso_end))==0)