vcl/source/filter/itiff/itiff.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit a5d5c29769d3c744d8a89052842f73dabd71f445 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Apr 1 22:04:32 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Apr 6 11:49:07 2023 +0200 use the same max size that libtiff defaults to for its own utilities Change-Id: I67a769a6108fb8590d6304390a4f27ef95927c9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149882 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx index 0251f0bcd9c1..19b3e46c3573 100644 --- a/vcl/source/filter/itiff/itiff.cxx +++ b/vcl/source/filter/itiff/itiff.cxx @@ -154,7 +154,8 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) } uint32_t nPixelsRequired; - constexpr size_t nMaxPixelsAllowed = SAL_MAX_INT32/4; + // use the same max size that libtiff defaults to for its own utilities + constexpr size_t nMaxPixelsAllowed = (256 * 1024 * 1024) / 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);