diff --git a/src/file_tiff.c b/src/file_tiff.c index 96626ce8..b30064f8 100644 --- a/src/file_tiff.c +++ b/src/file_tiff.c @@ -47,7 +47,7 @@ static void register_header_check_tiff(file_stat_t *file_stat); const file_hint_t file_hint_tiff= { .extension="tif", .description="Tag Image File Format and some raw file formats (pef/nef/dcr/sr2/cr2)", - .max_filesize=100*1024*1024, + .max_filesize=1024*1024*1024, .recover=1, .enable_by_default=1, .register_header_check=®ister_header_check_tiff diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c index 84b33af8..74bc61ea 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); } diff --git a/src/file_tiff_le.c b/src/file_tiff_le.c index d12f146b..196e4c36 100644 --- a/src/file_tiff_le.c +++ b/src/file_tiff_le.c @@ -176,13 +176,15 @@ unsigned int find_tag_from_tiff_header_le(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=le32(*tiff_next_diroff); + offset_ifd1=le32(*tiff_next_diroff); if(offset_ifd1 > 0) return find_tag_from_tiff_header_le_aux(buffer, tiff_size, tag, potential_error, offset_ifd1); }