diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-27 13:14:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-27 16:43:06 +0200 |
commit | b9f78bec3558937d45b3a9d730c1c9d40a9c58d6 (patch) | |
tree | 044004435e4ef2308f37b11065f2882ba553ca22 /vcl | |
parent | 9c514228132096f297379172687b49a57b9f3058 (diff) |
ofz#58380 Integer-overflow
Change-Id: I88155f7f2abf42a11376d6f54aab28c233cf7e07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151100
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 00921c609bca..eab791889ce6 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -925,8 +925,12 @@ static bool AllowScale(const Size& rSource, const Size& rDest) void MetaBmpScaleAction::Execute( OutputDevice* pOut ) { - if (!AllowScale(maBmp.GetSizePixel(), pOut->LogicToPixel(maSz))) + Size aPixelSize(pOut->LogicToPixel(maSz)); + if (!AllowRect(tools::Rectangle(pOut->LogicToPixel(maPt), aPixelSize)) || + !AllowScale(maBmp.GetSizePixel(), aPixelSize)) + { return; + } pOut->DrawBitmap( maPt, maSz, maBmp ); } |