vcl/source/filter/itiff/itiff.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit f3df14cc4343ce65608436acfa67b2ccfb68115d Author: Caolán McNamara <[email protected]> AuthorDate: Mon May 30 15:17:04 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon May 30 17:57:01 2022 +0200 ofz#47664 OOM Change-Id: If0d1ea55a194961fdb05ed2023bcfdaa6f933bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135129 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx index 6f81dffd08ef..9c0b6efff6b6 100644 --- a/vcl/source/filter/itiff/itiff.cxx +++ b/vcl/source/filter/itiff/itiff.cxx @@ -137,9 +137,10 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) } uint32_t nPixelsRequired; - if (o3tl::checked_multiply(w, h, nPixelsRequired)) + bool bOk = !o3tl::checked_multiply(w, h, nPixelsRequired) && nPixelsRequired <= SAL_MAX_INT32/4; + if (!bOk) { - SAL_WARN("filter.tiff", "skipping oversized tiff image"); + SAL_WARN("filter.tiff", "skipping oversized tiff image " << w << " x " << h); break; }
