summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-10-06 20:20:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-10-06 20:20:38 +0200
commit641992870db9818eb6db6a0e0bb87fcb88bae6ee (patch)
tree31a92780233790d482109b62c1fa60a9d0f20780
parent3f58711336035402a86cc747af5dce59823da89a (diff)
PhotoRec: ignore jpeg header beginning by a DQT if PhotoRec is already saving a file
See commit 4c5fcd4164b7fd06eafa54fa44ecfb9fb2d02d00
-rw-r--r--src/file_jpg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 1f6c573..9a5c3bd 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -409,8 +409,6 @@ static int header_check_jpg(const unsigned char *buffer, const unsigned int buff
}
if(file_recovery->file_check==&file_check_mpo)
return 0;
- if(buffer[3]==0xdb) /* *DQT */
- return 0;
}
/* Don't extract jpg inside AVI */
if( file_recovery->file_stat->file_hint==&file_hint_riff &&
@@ -421,6 +419,8 @@ static int header_check_jpg(const unsigned char *buffer, const unsigned int buff
if( file_recovery->file_stat->file_hint==&file_hint_mov &&
memcmp(buffer, jpg_header_app0_jfif11_null, sizeof(jpg_header_app0_jfif11_null))==0)
return 0;
+ if(buffer[3]==0xdb) /* DQT */
+ return 0;
}
while(i+4<buffer_size && buffer[i]==0xff && is_marker_valid(buffer[i+1]))
{