summaryrefslogtreecommitdiffstats
path: root/src/file_mpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-07-26 18:45:10 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-07-26 18:45:10 +0200
commitba0400f352d757572ff69b8af644ed1d5a75ea32 (patch)
treef18dc6f41b4ac0b0d87181f62cc14af74003a321 /src/file_mpg.c
parent71133cd98617acb921535443173b569e85488f67 (diff)
PhotoRec: disable data check of .mpg files for small blocksize
Diffstat (limited to 'src/file_mpg.c')
-rw-r--r--src/file_mpg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file_mpg.c b/src/file_mpg.c
index 28b7936..d7f1768 100644
--- a/src/file_mpg.c
+++ b/src/file_mpg.c
@@ -171,6 +171,8 @@ static int header_check_mpg_Pack(const unsigned char *buffer, const unsigned int
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_mpg.extension;
+ if(file_recovery_new->blocksize < 14)
+ return 1;
file_recovery_new->data_check=&data_check_mpg;
file_recovery_new->file_check=&file_check_size;
return 1;
@@ -179,6 +181,8 @@ static int header_check_mpg_Pack(const unsigned char *buffer, const unsigned int
return 0;
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_mpg.extension;
+ if(file_recovery_new->blocksize < 14)
+ return 1;
file_recovery_new->data_check=&data_check_mpg;
file_recovery_new->file_check=&file_check_size;
return 1;
@@ -210,6 +214,8 @@ static int header_check_mpg_Pack(const unsigned char *buffer, const unsigned int
{ /* SCR=0 */
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_mpg.extension;
+ if(file_recovery_new->blocksize < 14)
+ return 1;
file_recovery_new->data_check=&data_check_mpg;
file_recovery_new->file_check=&file_check_size;
return 1;
@@ -218,6 +224,8 @@ static int header_check_mpg_Pack(const unsigned char *buffer, const unsigned int
return 0;
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_mpg.extension;
+ if(file_recovery_new->blocksize < 14)
+ return 1;
file_recovery_new->data_check=&data_check_mpg;
file_recovery_new->file_check=&file_check_size;
return 1;