From 7715db0b6089b072ea96ced32c205b786b7e7a86 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Wed, 5 Jan 2011 07:55:58 +0100 Subject: [PATCH] PhotoRec: allows atom size up to 2GB --- src/file_mov.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/file_mov.c b/src/file_mov.c index cc06659e..7d75207a 100644 --- a/src/file_mov.c +++ b/src/file_mov.c @@ -78,9 +78,8 @@ static int header_check_mov(const unsigned char *buffer, const unsigned int buff } while(i1024*1024*1024) + const unsigned int atom_size=(buffer[i+0]<<24)+(buffer[i+1]<<16)+(buffer[i+2]<<8)+buffer[i+3]; + if(atom_size<8 || atom_size > (unsigned int)2*1024*1024*1024) return 0; /* check for commun atom type */ if(buffer[i+4]=='p' && buffer[i+5]=='n' && buffer[i+6]=='o' && buffer[i+7]=='t')