PhotoRec: Avoid false positive for .plist with .qbb and .sqlite

This commit is contained in:
Christophe Grenier 2016-02-13 16:09:09 +01:00
parent f4196e27b1
commit c566d9ade4

View file

@ -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;