From 641992870db9818eb6db6a0e0bb87fcb88bae6ee Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Mon, 6 Oct 2014 20:20:38 +0200 Subject: [PATCH] PhotoRec: ignore jpeg header beginning by a DQT if PhotoRec is already saving a file See commit 4c5fcd4164b7fd06eafa54fa44ecfb9fb2d02d00 --- src/file_jpg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file_jpg.c b/src/file_jpg.c index 1f6c573b..9a5c3bdf 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