summaryrefslogtreecommitdiffstats
path: root/src/file_zip.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-04-19 08:17:39 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-04-19 08:17:39 +0200
commit97e769cb5e9ce626d5dbf546ac28e8604bd18430 (patch)
tree0188ab65f0398214c9ede1b0fadd1a6fdbe3bfc3 /src/file_zip.c
parent3f0cf3027472a2929cd076e97999ba6867bbe2d6 (diff)
PhotoRec: distinguish iWork .pages file from .zip
Diffstat (limited to 'src/file_zip.c')
-rw-r--r--src/file_zip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/file_zip.c b/src/file_zip.c
index 3b869fc..791c633 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -246,10 +246,11 @@ static int zip_parse_file_entry(file_recovery_t *fr, const char **ext, const uns
}
else if(len==19 && memcmp(filename, "[Content_Types].xml", 19)==0)
msoffice=1;
+ /* Zipped Keyhole Markup Language (KML) used by Google Earth */
+ else if(len==7 && memcmp(filename, "doc.kml", 7)==0)
+ *ext="kmz";
else if(len==4 && memcmp(filename, "Home", 4)==0)
sh3d=1;
- else if(len==7 && memcmp(filename, "doc.kml", 7)==0)
- *ext="kmz"; /* Zipped Keyhole Markup Language (KML) used by Google Earth */
}
else if(file_nbr==1 && sh3d==1)
{
@@ -270,7 +271,10 @@ static int zip_parse_file_entry(file_recovery_t *fr, const char **ext, const uns
}
if(*ext==NULL)
{
- if(len==20 && strcasecmp(filename, "META-INF/MANIFEST.MF")==0)
+ /* iWork */
+ if(len==23 && memcmp(filename, "QuickLook/Thumbnail.jpg", 23)==0)
+ *ext="pages";
+ else if(len==20 && strcasecmp(filename, "META-INF/MANIFEST.MF")==0)
*ext="jar";
else if(len==15 && strcasecmp(filename, "chrome.manifest")==0)
*ext="xpi";