summaryrefslogtreecommitdiffstats
path: root/src/file_plist.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-02-13 16:09:09 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2016-02-13 16:09:09 +0100
commitc566d9ade4d988f72b723b92765d0cc9117c772b (patch)
treee956b5ba5f61729f4903979cfa9e669abccceda6 /src/file_plist.c
parentf4196e27b1c653e4fa18a738f04ba35e6833e416 (diff)
PhotoRec: Avoid false positive for .plist with .qbb and .sqlite
Diffstat (limited to 'src/file_plist.c')
-rw-r--r--src/file_plist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/file_plist.c b/src/file_plist.c
index d033549..fdb0ae0 100644
--- a/src/file_plist.c
+++ b/src/file_plist.c
@@ -30,6 +30,8 @@
#include "types.h"
#include "filegen.h"
+extern const file_hint_t file_hint_qbb;
+extern const file_hint_t file_hint_sqlite;
static void register_header_check_plist(file_stat_t *file_stat);
@@ -44,6 +46,15 @@ const file_hint_t file_hint_plist= {
static int header_check_plist(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(file_recovery->file_stat!=NULL)
+ {
+ if( file_recovery->file_stat->file_hint==&file_hint_qbb ||
+ file_recovery->file_stat->file_hint==&file_hint_sqlite)
+ {
+ header_ignored(file_recovery_new);
+ return 0;
+ }
+ }
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_plist.extension;
return 1;