summaryrefslogtreecommitdiffstats
path: root/src/file_indd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_indd.c')
-rw-r--r--src/file_indd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/file_indd.c b/src/file_indd.c
index 8016389..9c624cb 100644
--- a/src/file_indd.c
+++ b/src/file_indd.c
@@ -46,7 +46,7 @@ static void file_check_indd(file_recovery_t *file_recovery);
const file_hint_t file_hint_indd= {
.extension="indd",
.description="InDesign File",
- .min_header_distance=8192,
+ .min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
.enable_by_default=1,
@@ -124,6 +124,10 @@ 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)