summaryrefslogtreecommitdiffstats
path: root/src/file_mkv.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_mkv.c
parent6cbb862854011bf8fec7f17a303563faa9b953eb (diff)
Make some variables more local
Diffstat (limited to 'src/file_mkv.c')
-rw-r--r--src/file_mkv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file_mkv.c b/src/file_mkv.c
index b2cbaf6..505da76 100644
--- a/src/file_mkv.c
+++ b/src/file_mkv.c
@@ -134,10 +134,11 @@ static void register_header_check_mkv(file_stat_t *file_stat)
static int header_check_mkv(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- const unsigned char EBML_DocType[2]= { 0x42,0x82};
- const unsigned char EBML_Segment[4]= { 0x18,0x53,0x80,0x67};
- if(memcmp(buffer,EBML_header,sizeof(EBML_header))==0)
+ if(memcmp(buffer,EBML_header,sizeof(EBML_header))!=0)
+ return 0;
{
+ const unsigned char EBML_DocType[2]= { 0x42,0x82};
+ const unsigned char EBML_Segment[4]= { 0x18,0x53,0x80,0x67};
uint64_t segment_size=0;
uint64_t header_data_size=0;
char *doctype=NULL;
@@ -193,7 +194,6 @@ static int header_check_mkv(const unsigned char *buffer, const unsigned int buff
file_recovery_new->data_check=&data_check_size;
file_recovery_new->file_check=&file_check_size;
}
- return 1;
}
- return 0;
+ return 1;
}