PhotoRec: sr2 files may violate some TIFF specifications
This commit is contained in:
parent
b27f191679
commit
edf52264ae
2 changed files with 2 additions and 2 deletions
|
@ -182,7 +182,7 @@ void file_check_tiff(file_recovery_t *fr)
|
|||
calculated_file_size=header_check_tiff_be(fr, be32(header.tiff_diroff), 0, 0);
|
||||
#ifdef DEBUG_TIFF
|
||||
log_info("TIFF Current %llu\n", (unsigned long long)fr->file_size);
|
||||
log_info("TIFF Estimated %llu\n", (unsigned long long)calculated_file_size);
|
||||
log_info("TIFF Estimated %llu %llx\n", (unsigned long long)calculated_file_size, (unsigned long long)calculated_file_size);
|
||||
#endif
|
||||
if(fr->file_size < calculated_file_size || calculated_file_size==0)
|
||||
fr->file_size=0;
|
||||
|
|
|
@ -326,7 +326,7 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
|
|||
if(tdir_tag_old > tdir_tag)
|
||||
{ /* Entries must be sorted by tag, some SR2 file doesn't respected this rule */
|
||||
sorted_tag_error++;
|
||||
if(sorted_tag_error > 1)
|
||||
if(sorted_tag_error > 1 && strcmp(fr->extension,"sr2")!=0)
|
||||
return -1;
|
||||
}
|
||||
if(val>4)
|
||||
|
|
Loading…
Reference in a new issue