summaryrefslogtreecommitdiffstats
path: root/src/file_tiff_be.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2020-04-22 17:52:08 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2020-04-22 17:52:08 +0200
commit04ec8987ca97cbb5db879c43e6d4727ea58a4b4d (patch)
treeb7850d90108bf8305fa589d48404aaf67037a7e1 /src/file_tiff_be.c
parent3840fa62b3134af8273c5f98fdc0561529827fed (diff)
PhotoRec: recover TIFF up to 1 GB (Previous limit was 100 MB)
Diffstat (limited to 'src/file_tiff_be.c')
-rw-r--r--src/file_tiff_be.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c
index 84b33af..74bc61e 100644
--- a/src/file_tiff_be.c
+++ b/src/file_tiff_be.c
@@ -174,13 +174,15 @@ unsigned int find_tag_from_tiff_header_be(const unsigned char *buffer, const uns
if(offset_tiff_next_diroff < tiff_size - 4)
{
const unsigned char *ptr_hdr;
+ const uint32_t *tiff_next_diroff;
+ unsigned int offset_ifd1;
/*@ assert offset_tiff_next_diroff + 4 <= tiff_size; */
ptr_hdr=&buffer[offset_tiff_next_diroff];
/*@ assert \valid_read(ptr_hdr + (0 .. 4-1)); */
- const uint32_t *tiff_next_diroff=(const uint32_t *)ptr_hdr;
+ tiff_next_diroff=(const uint32_t *)ptr_hdr;
/*@ assert \valid_read(tiff_next_diroff); */
/* IFD1 */
- const unsigned int offset_ifd1=be32(*tiff_next_diroff);
+ offset_ifd1=be32(*tiff_next_diroff);
if(offset_ifd1 > 0)
return find_tag_from_tiff_header_be_aux(buffer, tiff_size, tag, potential_error, offset_ifd1);
}