From 651658d37bcb3f493942dd5d0b9a0d65c96f105c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 23 Nov 2022 20:07:20 +0000 Subject: ofz#53673 Integer-overflow LogicWidthToDeviceCoordinate takes Long anyway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I840ad3242ce434e841cd4159c2e7f0b146168138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143193 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/outdev/text.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 3e86ab61d19f..7b9dde2a94a8 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1793,8 +1793,8 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta { std::unique_ptr const pCaretXArray(new sal_Int32[2 * aStr.getLength()]); /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(), 0, aStr.getLength() ); - sal_Int32 lc_x1 = pCaretXArray[2*nMnemonicPos]; - sal_Int32 lc_x2 = pCaretXArray[2*nMnemonicPos+1]; + tools::Long lc_x1 = pCaretXArray[2*nMnemonicPos]; + tools::Long lc_x2 = pCaretXArray[2*nMnemonicPos+1]; nMnemonicWidth = rTargetDevice.LogicWidthToDeviceCoordinate( std::abs(lc_x1 - lc_x2) ); Point aTempPos = rTargetDevice.LogicToPixel( aPos ); -- cgit