PhotoRec: ignore jpeg header beginning by a DQT if PhotoRec is already saving a file

See commit 4c5fcd4164
This commit is contained in:
Christophe Grenier 2014-10-06 20:20:38 +02:00
parent 3f58711336
commit 641992870d

View file

@ -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]))
{