summaryrefslogtreecommitdiffstats
path: root/src/file_mp3.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-03-30 19:31:33 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-03-30 19:31:33 +0200
commita23c1b5a884bd22aa0eb9d9889c2e3980126925e (patch)
treec1709f604541cc41c5722d4f7bb1026bd4b5bff6 /src/file_mp3.c
parent45903de1b5a8125c86254e2f712bc4f2d3a9f462 (diff)
PhotoRec: better check to avoid to concat mp3 files
Diffstat (limited to 'src/file_mp3.c')
-rw-r--r--src/file_mp3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/file_mp3.c b/src/file_mp3.c
index 765d9b1..f29b75b 100644
--- a/src/file_mp3.c
+++ b/src/file_mp3.c
@@ -166,8 +166,10 @@ static int header_check_mp3(const unsigned char *buffer, const unsigned int buff
return 0;
if(file_recovery!=NULL && file_recovery->file_stat!=NULL)
{
- if(file_recovery->file_stat->file_hint==&file_hint_mp3 ||
- file_recovery->file_stat->file_hint==&file_hint_mkv)
+ if(file_recovery->data_check==&data_check_mp3 &&
+ file_recovery->calculated_file_size == file_recovery->file_size)
+ return 0;
+ if(file_recovery->file_stat->file_hint==&file_hint_mkv)
return 0;
/* RGV values from TIFF may be similar to the beginning of an mp3 */
if(file_recovery->file_stat->file_hint==&file_hint_tiff &&