summaryrefslogtreecommitdiff
authorChristophe Grenier <grenier@cgsecurity.org>2010-05-21 06:59:21 (GMT)
committer Christophe Grenier <grenier@cgsecurity.org>2010-05-21 06:59:21 (GMT)
commitbc71c42c22613592514cfe955bcb2410ae4f560e (patch)
treea30f03c7b30513425219128bde0d7133dde67e7f
parent7d40e13a7f814c66bcd50e1089e39cb1717161be (diff)
PhotoRec: recover Bentley Systems' MicroStation .dgn file format
Diffstat
-rw-r--r--src/file_doc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_doc.c b/src/file_doc.c
index ef3c70e..88167e2 100644
--- a/src/file_doc.c
+++ b/src/file_doc.c
@@ -286,6 +286,8 @@ static const char *ole_get_file_extension(const unsigned char *buffer, const uns
/* Quattro Pro spreadsheet */
if(memcmp(&dir_entry->name, "N\0a\0t\0i\0v\0e\0C\0o\0n\0t\0e\0n\0t\0_\0M\0A\0I\0N\0", 36)==0)
return "qpw";
+ if(sid==1 && memcmp(&dir_entry->name, "D\0g\0n", 6)==0)
+ return "dgn";
}
if(ext!=NULL)
return ext;
@@ -545,6 +547,8 @@ static const char *software2ext(const unsigned int count, const unsigned char *s
return "xls";
if(count>=20 && memcmp(software, "Microsoft PowerPoint", 20)==0)
return "ppt";
+ if(count>=12 && memcmp(software, "MicroStation", 12)==0)
+ return "dgn";
return NULL;
}
@@ -878,6 +882,8 @@ static void file_rename_doc(const char *old_filename)
/* Quattro Pro spreadsheet */
else if(memcmp(dir_entry->name, "N\0a\0t\0i\0v\0e\0C\0o\0n\0t\0e\0n\0t\0_\0M\0A\0I\0N\0", 36)==0)
ext="qpw";
+ if(sid==1 && memcmp(dir_entry->name, "D\0g\0n", 6)==0)
+ return "dgn";
}
}
}