summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:13:52 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-05-19 14:13:52 +0200
commit109735551a5e986d8013667aae30b668cb6190c7 (patch)
tree8c7a0b1383ec2d95fbc1ea07f544f5f584968b74
parentc849ac047db045f6134e7d5edd82a706faf249d0 (diff)
PhotoRec: avoid splitting Mind Your Own Business .myo files
-rw-r--r--src/file_myo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_myo.c b/src/file_myo.c
index 0865f8a..25af8e0 100644
--- a/src/file_myo.c
+++ b/src/file_myo.c
@@ -48,6 +48,12 @@ static int header_check_myo(const unsigned char *buffer, const unsigned int buff
const uint64_t size=(uint64_t)buffer[0]+(((uint64_t)buffer[1])<<8)+(((uint64_t)buffer[2])<<16)+(((uint64_t)buffer[3])<<24)+1;
if(size < 0x9ce + 6)
return 0;
+ if(file_recovery->file_stat!=NULL &&
+ file_recovery->file_stat->file_hint==&file_hint_myo)
+ {
+ header_ignored(file_recovery_new);
+ return 0;
+ }
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_myo.extension;
file_recovery_new->calculated_file_size=size;