summaryrefslogtreecommitdiffstats
path: root/src/fidentify.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-04-27 08:39:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2010-04-27 08:39:24 +0200
commitc1afbdf78024f1590b7805244ddc40ba16297379 (patch)
treee2f5a9d72e1a59569cfcb21342c5cfaa4419086a /src/fidentify.c
parent8ee9f770fa81752c44b9bfc38e04ab88eafeec4a (diff)
PhotoRec: modify internals for brute-force recovery
Diffstat (limited to 'src/fidentify.c')
-rw-r--r--src/fidentify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fidentify.c b/src/fidentify.c
index 42ad9bd..2795455 100644
--- a/src/fidentify.c
+++ b/src/fidentify.c
@@ -65,11 +65,12 @@ static int file_identify(const char *filename)
unsigned int buffer_size;
const unsigned int read_size=(blocksize>65536?blocksize:65536);
file_recovery_t file_recovery;
+ reset_file_recovery(&file_recovery);
+ file_recovery.blocksize=blocksize;
buffer_size=blocksize + READ_SIZE;
buffer_start=(unsigned char *)MALLOC(buffer_size);
buffer_olddata=buffer_start;
buffer=buffer_olddata + blocksize;
- reset_file_recovery(&file_recovery);
file=fopen(filename, "rb");
if(file==NULL)
return -1;
@@ -81,8 +82,9 @@ static int file_identify(const char *filename)
}
fclose(file);
{
- file_recovery_t file_recovery_new;
struct td_list_head *tmpl;
+ file_recovery_t file_recovery_new;
+ file_recovery_new.blocksize=blocksize;
file_recovery_new.file_stat=NULL;
td_list_for_each(tmpl, &file_check_list.list)
{