summaryrefslogtreecommitdiffstats
path: root/src/file_wpd.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-05-21 09:17:03 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2010-05-21 09:17:03 +0200
commit21d47fea5168186938a4187055afe1d4d042977e (patch)
treeffae33212300de017aec73bf44c392d855f44b58 /src/file_wpd.c
parent13055f4694b0d02bda8ec7f6320cd362be566546 (diff)
PhotoRec: stricter check for .wpd
Diffstat (limited to 'src/file_wpd.c')
-rw-r--r--src/file_wpd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file_wpd.c b/src/file_wpd.c
index f9b2a26..3349d28 100644
--- a/src/file_wpd.c
+++ b/src/file_wpd.c
@@ -52,7 +52,8 @@ static void register_header_check_wpd(file_stat_t *file_stat)
static int header_check_wpd(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)
{
- if(memcmp(buffer, wpd_header, sizeof(wpd_header))==0)
+ if(memcmp(buffer, wpd_header, sizeof(wpd_header))==0 &&
+ buffer[0x10]==5 && buffer[0x11]==0)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_wpd.extension;