summaryrefslogtreecommitdiffstats
path: root/src/file_mpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-09-10 22:19:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-09-10 22:19:38 +0200
commitf29c37c87b097e8761ec359165f27a0ff786368f (patch)
treed3b9e2ca5ab40a0df763f2be12e3d02ef063f0a1 /src/file_mpg.c
parent6cbb862854011bf8fec7f17a303563faa9b953eb (diff)
Make some variables more local
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 322a241..ba50ef4 100644
--- a/src/file_mpg.c
+++ b/src/file_mpg.c
@@ -156,7 +156,6 @@ static int header_check_mpg(const unsigned char *buffer, const unsigned int buff
static int data_check_mpg(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery)
{
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};
/* search padding + end code */
if(buffer_size>=8 && memcmp(&buffer[buffer_size/2-4], padding_iso_end, sizeof(padding_iso_end))==0)
{
@@ -169,6 +168,7 @@ static int data_check_mpg(const unsigned char *buffer, const unsigned int buffer
unsigned int i;
for(i=buffer_size/2-7; i<buffer_size-7; i++)
{
+ const unsigned char sequence_end_iso_end[8]={0x00, 0x00, 0x01, 0xB7, 0x00, 0x00, 0x01, 0xB9};
if(buffer[i]==0x00 && memcmp(&buffer[i], sequence_end_iso_end, sizeof(sequence_end_iso_end))==0)
{
file_recovery->calculated_file_size=file_recovery->file_size+i+sizeof(sequence_end_iso_end)-buffer_size/2;