PhotoRec: disable data check of .psd files for small blocksize
This commit is contained in:
parent
9b7133e1e5
commit
a40e5a6ab9
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void register_header_check_psd(file_stat_t *file_stat);
|
static void register_header_check_psd(file_stat_t *file_stat);
|
||||||
static int header_check_psd(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);
|
|
||||||
static data_check_t psd_skip_color_mode(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery);
|
static data_check_t psd_skip_color_mode(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery);
|
||||||
static void file_check_psd(file_recovery_t *file_recovery);
|
static void file_check_psd(file_recovery_t *file_recovery);
|
||||||
|
|
||||||
|
@ -69,6 +68,8 @@ static int header_check_psd(const unsigned char *buffer, const unsigned int buff
|
||||||
reset_file_recovery(file_recovery_new);
|
reset_file_recovery(file_recovery_new);
|
||||||
file_recovery_new->min_filesize=70;
|
file_recovery_new->min_filesize=70;
|
||||||
file_recovery_new->extension=file_hint_psd.extension;
|
file_recovery_new->extension=file_hint_psd.extension;
|
||||||
|
if(file_recovery_new->blocksize < 16)
|
||||||
|
return 1;
|
||||||
/* File header */
|
/* File header */
|
||||||
file_recovery_new->calculated_file_size=0x1a;
|
file_recovery_new->calculated_file_size=0x1a;
|
||||||
file_recovery_new->data_check=&psd_skip_color_mode;
|
file_recovery_new->data_check=&psd_skip_color_mode;
|
||||||
|
|
Loading…
Reference in a new issue