summaryrefslogtreecommitdiffstats
path: root/src/file_riff.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-07-03 07:52:41 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-07-03 07:52:41 +0200
commitc6477241509c08665454752974a1243bd2715340 (patch)
tree67fbd7556090e9919613a03e867979073949a66f /src/file_riff.c
parent7d59c4ad3c1c8d7ca1ef7e983f1d39a3cae2b190 (diff)
PhotoRec: identify several RIFF files:
- MIDI sound file .mid - MIDI MIDI Instruments Definition File .idf - Windows Animated Cursor .ani
Diffstat (limited to 'src/file_riff.c')
-rw-r--r--src/file_riff.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/file_riff.c b/src/file_riff.c
index ef41b60..93a796d 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -63,7 +63,7 @@ static int header_check_riff(const unsigned char *buffer, const unsigned int buf
file_recovery_new->extension="avi";
else if(memcmp(&buffer[8],"CDDA",4)==0)
file_recovery_new->extension="cda";
- else if(memcmp(&buffer[8],"CDR",3)==0)
+ else if(memcmp(&buffer[8],"CDR",3)==0 || memcmp(&buffer[8],"cdr6",4)==0)
file_recovery_new->extension="cdr";
else if(memcmp(&buffer[8],"NUND",4)==0)
{
@@ -74,6 +74,15 @@ static int header_check_riff(const unsigned char *buffer, const unsigned int buf
}
else if(memcmp(&buffer[8],"RMP3",4)==0 || memcmp(&buffer[8],"WAVE",4)==0)
file_recovery_new->extension="wav";
+ /* MIDI sound file */
+ else if(memcmp(&buffer[8],"RMID",4)==0)
+ file_recovery_new->extension="mid";
+ /* MIDI Instruments Definition File */
+ else if(memcmp(&buffer[8],"IDF LIST",8)==0)
+ file_recovery_new->extension="idf";
+ /* Windows Animated Cursor */
+ else if(memcmp(&buffer[8],"ACON",4)==0)
+ file_recovery_new->extension="ani";
else
file_recovery_new->extension="avi";
return 1;