summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2019-12-28 11:57:51 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2019-12-28 11:57:51 +0100
commitbb3993d045eb1eb8822e443ea3b8fedcd98d0d4a (patch)
treecfc7fcaaf8a942fc6117861ee77c84e3485c7b58
parent26c361bac08b0d69a247f01662014057e8ba52b1 (diff)
PhotoRec: src/file_mov.c - fix bad check introduced in commit 91ba106b2523a64b7f1dd18e6d32f4b50d1509a9
-rw-r--r--src/file_mov.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/file_mov.c b/src/file_mov.c
index 6e71676..2246cd7 100644
--- a/src/file_mov.c
+++ b/src/file_mov.c
@@ -136,8 +136,9 @@ static data_check_t data_check_mov(const unsigned char *buffer, const unsigned i
}
else if(atom_size<8)
return DC_STOP;
- if(atom_size >= 0x80000000)
+ if(atom_size >= 0x800000000000)
return DC_STOP;
+ /*@ assert 8 <= atom_size < 0x800000000000; */
#ifdef DEBUG_MOV
log_trace("file_mov.c: %s atom %c%c%c%c (0x%02x%02x%02x%02x) size %llu, calculated_file_size %llu\n",
file_recovery->filename,
@@ -238,9 +239,9 @@ static int header_check_mov_aux(const unsigned char *buffer, const unsigned int
else if(atom_size<8)
return 0;
/*@ assert 8 <= atom_size; */
- if(atom_size >= 0x80000000)
+ if(atom_size >= 0x800000000000)
return 0;
- /*@ assert 8 <= atom_size < 0x80000000; */
+ /*@ assert 8 <= atom_size < 0x800000000000; */
calculated_file_size=atom_size+i;
/* check for commun atom type */
if(buffer[i+4]=='p' && buffer[i+5]=='n' && buffer[i+6]=='o' && buffer[i+7]=='t')