summaryrefslogtreecommitdiffstats
path: root/src/file_riff.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-03-23 14:59:10 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-03-23 14:59:10 +0100
commitff28a8c8849a2ce0bc4e0df38c6bc5800370fa74 (patch)
treec89f9ac6a93a631d314571273124ebf1516d68a4 /src/file_riff.c
parente049dc130dab9c34dcfb58d98efb601e7f231814 (diff)
PhotoRec: fix cpr size detection (regression introduced in commit 622e8c7f19ff7dc9287fb5a43452d876c4d979a8)
Diffstat (limited to 'src/file_riff.c')
-rw-r--r--src/file_riff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file_riff.c b/src/file_riff.c
index 0744d81..ea3d98a 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -221,7 +221,9 @@ static int header_check_riff(const unsigned char *buffer, const unsigned int buf
{
/* Cubase Project File */
file_recovery_new->extension="cpr";
- file_recovery_new->calculated_file_size+=12;
+ file_recovery_new->calculated_file_size=(((uint64_t)buffer[4])<<24) +
+ (((uint64_t)buffer[5])<<16) + (((uint64_t)buffer[6])<<8) +
+ (uint64_t)buffer[7] + 12;
return 1;
}
/* Windows Animated Cursor */