summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-07-26 19:16:10 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-07-26 19:16:10 +0200
commitee3e137985cd468a3a20404397549729fbf33651 (patch)
tree69e1a9b07b224e96b59fdeb602d6b5f0dafb4e8f
parent76758703fcf2995ffe5fe0b7c2524c2e3ca0ed59 (diff)
PhotoRec: stricter check for .pct
-rw-r--r--src/file_pct.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file_pct.c b/src/file_pct.c
index 48d7b7e..b97ec7a 100644
--- a/src/file_pct.c
+++ b/src/file_pct.c
@@ -97,7 +97,9 @@ static int header_check_pct(const unsigned char *buffer, const unsigned int buff
be16(pct->OYMin) <= be16(pct->OXMin))) &&
be16(pct->XMin)==0 && /* Reject some valid but uncommon files */
be16(pct->YMin)==0 &&
- be16(pct->OYMin)==0)
+ be16(pct->OYMin)==0 &&
+ be16(pct->VersionOperator)==0x0011 &&
+ be16(pct->VersionNumber)==0x02ff)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_pct.extension;