summaryrefslogtreecommitdiffstats
path: root/src/file_indd.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-09-03 08:04:04 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-09-03 08:04:04 +0200
commit00557961744f0a88000678db179a84a4a0e4fdfd (patch)
treedb0bae677a788104fa71edaebcbfa30402833179 /src/file_indd.c
parentac980c4a61e0158ce5ceec8555a89b38eac5066c (diff)
PhotoRec: reduce the number of backward search
Diffstat (limited to 'src/file_indd.c')
-rw-r--r--src/file_indd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/file_indd.c b/src/file_indd.c
index 5f3ae24..22b71df 100644
--- a/src/file_indd.c
+++ b/src/file_indd.c
@@ -123,14 +123,17 @@ static int header_check_indd(const unsigned char *buffer, const unsigned int buf
const struct InDesignMasterPage *hdr0 = (const struct InDesignMasterPage *)buffer;
const struct InDesignMasterPage *hdr1 = (const struct InDesignMasterPage *)&buffer[4096];
hdr=(le64(hdr0->fSequenceNumber) > le64(hdr1->fSequenceNumber) ? hdr0 : hdr1);
- if(file_recovery->file_stat!=NULL &&
- file_recovery->file_stat->file_hint==&file_hint_indd &&
- file_recovery->file_size <= 8192)
- return 0;
if(hdr->fObjectStreamEndian!=1 && hdr->fObjectStreamEndian!=2)
return 0;
if(le32(hdr->fFilePages)==0)
return 0;
+ if(file_recovery->file_stat!=NULL &&
+ file_recovery->file_stat->file_hint==&file_hint_indd &&
+ file_recovery->file_size <= 8192)
+ {
+ header_ignored(file_recovery_new);
+ return 0;
+ }
reset_file_recovery(file_recovery_new);
#ifdef DJGPP
file_recovery_new->extension="ind";