PhotoRec: Limit recursion when parsing TIFF images files
This commit is contained in:
parent
416ec9551a
commit
de55395de3
2 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
|
|||
tiff_next_diroff=(const uint32_t *)entry;
|
||||
if(be32(*tiff_next_diroff) > 0)
|
||||
{
|
||||
const uint64_t new_offset=header_check_tiff_be(fr, be32(*tiff_next_diroff), depth, count+1);
|
||||
const uint64_t new_offset=header_check_tiff_be(fr, be32(*tiff_next_diroff), depth+1, count+1);
|
||||
if(new_offset != -1 && max_offset < new_offset)
|
||||
max_offset=new_offset;
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
|
|||
tiff_next_diroff=(const uint32_t *)entry;
|
||||
if(le32(*tiff_next_diroff) > 0)
|
||||
{
|
||||
const uint64_t new_offset=header_check_tiff_le(fr, le32(*tiff_next_diroff), depth, count+1);
|
||||
const uint64_t new_offset=header_check_tiff_le(fr, le32(*tiff_next_diroff), depth+1, count+1);
|
||||
if(new_offset != -1 && max_offset < new_offset)
|
||||
max_offset=new_offset;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue