summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-07-26 15:49:40 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-07-26 15:49:40 +0200
commit03ac352e4f815c937b28b3ae6625ebf12dd97a60 (patch)
tree9af02ba6a51662d383bdc786eae78b902d6a37aa
parenta615ff69bb80aa342eadfc236976ec7bd3b4263b (diff)
PhotoRec: disable data check of .caf files for small blocksize
-rw-r--r--src/file_caf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/file_caf.c b/src/file_caf.c
index e36b984..13e6e15 100644
--- a/src/file_caf.c
+++ b/src/file_caf.c
@@ -103,10 +103,13 @@ static int header_check_caf(const unsigned char *buffer, const unsigned int buff
return 0;
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_caf.extension;
- file_recovery_new->data_check=&data_check_caf;
- file_recovery_new->file_check=&file_check_size;
- file_recovery_new->calculated_file_size=8;
file_recovery_new->min_filesize=8+12;
+ if(file_recovery_new->blocksize >= 12)
+ {
+ file_recovery_new->data_check=&data_check_caf;
+ file_recovery_new->file_check=&file_check_size;
+ file_recovery_new->calculated_file_size=8;
+ }
return 1;
}