diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-30 15:17:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-30 17:57:01 +0200 |
commit | f3df14cc4343ce65608436acfa67b2ccfb68115d (patch) | |
tree | c6f1ff46303b4b49b7df61c04b9d6fad8dbbe636 /vcl | |
parent | 9104861a41e0edd07e4d74da47acb4e9d92b1ddd (diff) |
ofz#47664 OOM
Change-Id: If0d1ea55a194961fdb05ed2023bcfdaa6f933bfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135129
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/itiff/itiff.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |