From 09b452c2e174aa1be3b826198cd3b495b7ede454 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 4 Nov 2022 14:04:05 +0000 Subject: ofz#53028 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I08f072e28e182dd8b606a93b5509e7cb38e173e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142281 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/outdev/hatch.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/source') diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 9ae44a563c1b..10930bbcb424 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -316,7 +316,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n { const double fAngle = std::abs( toRadians(nAngle) ); const double fTan = tan( fAngle ); - const tools::Long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan ); + const tools::Long nXOff = FRound( (static_cast(rRect.Bottom()) - rRect.Top()) / fTan ); tools::Long nPX; nDist = FRound( nDist / sin( fAngle ) ); -- cgit