summaryrefslogtreecommitdiffstats
path: root/src/file_ra.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-05-30 18:09:08 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-05-30 18:09:08 +0200
commitdbbedfd758cf13f6bb0659dfb745f0cdeb299572 (patch)
treeead8a426ccd5a52ebe9266ebf3d15fd9a1ca56e2 /src/file_ra.c
parentd0cdf68c5fe0390830453eb7956c8df9d408abb0 (diff)
Fix Real Audio .ra recovery
Diffstat (limited to 'src/file_ra.c')
-rw-r--r--src/file_ra.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/file_ra.c b/src/file_ra.c
index 2a2558f..76bc82c 100644
--- a/src/file_ra.c
+++ b/src/file_ra.c
@@ -55,16 +55,13 @@ static int header_check_ra(const unsigned char *buffer, const unsigned int buffe
{
if(memcmp(buffer,ra_header,sizeof(ra_header))==0)
{
- if(buffer[5]==0x00 && buffer[6]==0x03)
+ if(buffer[4]==0x00 && buffer[5]==0x03)
{ /* V3 */
reset_file_recovery(file_recovery_new);
- file_recovery_new->calculated_file_size=8+(buffer[7]<<8)+buffer[8]+(buffer[0x12]<<24)+(buffer[0x13]<<16)+(buffer[0x14]<<8)+buffer[0x15];
file_recovery_new->extension=file_hint_ra.extension;
- file_recovery_new->data_check=&data_check_size;
- file_recovery_new->file_check=&file_check_size;
return 1;
}
- else if(buffer[5]==0x00 && buffer[6]==0x04 && buffer[8]=='r' && buffer[9]=='a' && buffer[10]=='4')
+ else if(buffer[4]==0x00 && buffer[5]==0x04 && buffer[8]=='r' && buffer[9]=='a' && buffer[10]=='4')
{ /* V4 */
reset_file_recovery(file_recovery_new);
file_recovery_new->calculated_file_size=(buffer[11]<<24)+(buffer[12]<<16)+(buffer[13]<<8)+buffer[14]+40;