vcl/source/outdev/hatch.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 09b452c2e174aa1be3b826198cd3b495b7ede454 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Nov 4 14:04:05 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Nov 4 18:32:33 2022 +0100 ofz#53028 Integer-overflow Change-Id: I08f072e28e182dd8b606a93b5509e7cb38e173e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142281 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> 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<double>(rRect.Bottom()) - rRect.Top()) / fTan ); tools::Long nPX; nDist = FRound( nDist / sin( fAngle ) );