summaryrefslogtreecommitdiffstats
path: root/src/file_zip.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-06-17 08:08:28 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-06-17 08:08:28 +0200
commit44ba6b5925602c766b19301c18097055ce98b361 (patch)
treefe8b7c66d64ac4826a4bd3aeaad5833f3f73a21c /src/file_zip.c
parent821ec686052ced392cfc1f39e12e24f188311091 (diff)
PhotoRec: identify Delcam Powershape .psmodel files from first entry in OLE document
Diffstat (limited to 'src/file_zip.c')
-rw-r--r--src/file_zip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/file_zip.c b/src/file_zip.c
index 19e2627..7a95585 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -41,6 +41,7 @@
#include "log.h"
/* #define DEBUG_ZIP */
+extern const file_hint_t file_hint_doc;
static void register_header_check_zip(file_stat_t *file_stat);
static int header_check_zip(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);
static void file_check_zip(file_recovery_t *file_recovery);
@@ -682,6 +683,12 @@ static int header_check_zip(const unsigned char *buffer, const unsigned int buff
#endif
if(memcmp(buffer,zip_header,sizeof(zip_header))==0)
{
+ if(file_recovery!=NULL && file_recovery->file_stat!=NULL &&
+ file_recovery->file_stat->file_hint==&file_hint_doc &&
+ (strcmp(file_recovery->extension,"doc")==0 ||
+ strcmp(file_recovery->extension,"psmodel")==0)
+ && memcmp(&buffer[30], "macrolog_1.mac", 14)==0)
+ return 0;
reset_file_recovery(file_recovery_new);
file_recovery_new->min_filesize=21;
file_recovery_new->file_check=&file_check_zip;