summaryrefslogtreecommitdiffstats
path: root/src/file_dpx.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-07-24 23:42:58 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-07-24 23:42:58 +0200
commit6b1e0e58d21df8700274de3c44da827449a918a4 (patch)
treeae6ee99f0b7784728f450712d281167af189d453 /src/file_dpx.c
parent617179f5d804f94610bf07d04fab738a0838c0a3 (diff)
PhotoRec: stricter check for .dpx
Diffstat (limited to 'src/file_dpx.c')
-rw-r--r--src/file_dpx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/file_dpx.c b/src/file_dpx.c
index 93addfa..900526b 100644
--- a/src/file_dpx.c
+++ b/src/file_dpx.c
@@ -73,6 +73,8 @@ static int header_check_dpx(const unsigned char *buffer, const unsigned int buff
if(memcmp(dpx->vers, ver10, sizeof(ver10))==0)
{
struct tm tm_time;
+ if(be32(dpx->file_size) < 19)
+ return 0;
memset(&tm_time, 0, sizeof(tm_time));
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_dpx.extension;