summaryrefslogtreecommitdiffstats
path: root/src/file_gz.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-07-03 07:52:03 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-07-03 07:52:03 +0200
commit7d59c4ad3c1c8d7ca1ef7e983f1d39a3cae2b190 (patch)
treeee2b794fd4cd7f475ea07f9ff819e0628e72b7a4 /src/file_gz.c
parentf06c9edf800203d21feb90fce69c4c014242e2db (diff)
PhotoRec: distinguish .html.gz from .gz
Diffstat (limited to 'src/file_gz.c')
-rw-r--r--src/file_gz.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/file_gz.c b/src/file_gz.c
index 6327111..fa033ea 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -161,6 +161,22 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
file_recovery_new->extension="pvp";
return 1;
}
+#ifndef DJGPP
+ {
+ unsigned int i;
+ for(i=0; i<d_stream.total_out && i< 256; i++)
+ {
+ if(buffer_uncompr[i]=='<')
+ {
+ if(strncasecmp((const char*)&buffer_uncompr[i], "<html", 5)==0)
+ {
+ file_recovery_new->extension="html.gz";
+ return 1;
+ }
+ }
+ }
+ }
+#endif
if(d_stream.total_out>0x110 &&
memcmp(&buffer_uncompr[0x101],tar_header_posix,sizeof(tar_header_posix))==0)
{