vcl/source/filter/itiff/itiff.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit d28a000130e5739af90e771d46faa630823add29
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Jun 12 16:01:38 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Jun 12 21:14:08 2024 +0200

    Resolves: tdf#160635 allow larger tiff images
    
    Change-Id: I67a21877e7e75c2753218a7e6c978f691d679583
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168747
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index 9bfa4472a817..81f21c411b5c 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -155,8 +155,7 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& 
rGraphic)
         }
 
         uint32_t nPixelsRequired;
-        // use the same max size that libtiff defaults to for its own utilities
-        constexpr size_t nMaxPixelsAllowed = (256 * 1024 * 1024) / 4;
+        constexpr size_t nMaxPixelsAllowed = SAL_MAX_INT32/4;
         // two buffers currently required, so limit further
         bool bOk = !o3tl::checked_multiply(w, h, nPixelsRequired) && 
nPixelsRequired <= nMaxPixelsAllowed / 2;
         SAL_WARN_IF(!bOk, "filter.tiff", "skipping oversized tiff image " << w 
<< " x " << h);

Reply via email to