diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c index 38b58cf7..001c895f 100644 --- a/src/file_tiff_be.c +++ b/src/file_tiff_be.c @@ -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; } diff --git a/src/file_tiff_le.c b/src/file_tiff_le.c index 3e6e680e..b0dfda33 100644 --- a/src/file_tiff_le.c +++ b/src/file_tiff_le.c @@ -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; }