[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Wed Feb 28 21:19:02 UTC 2018
filter/source/msfilter/msdffimp.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit f2573a3f1bd50d4bbc6dffaac17c7ba10d6fd6a3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 28 21:15:44 2018 +0000
ofz#6617 Integer-overflow
Change-Id: I4fc99ef32e769222164b30373acc5c387a922b88
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 96c29b639302..12e8cdb6b005 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5010,8 +5010,8 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
{
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{
- double fWidth = r - l;
- double fHeight= u - o;
+ double fWidth = o3tl::saturating_sub(r, l);
+ double fHeight= o3tl::saturating_sub(u, o);
double fXScale = static_cast<double>(rClientRect.GetWidth()) / static_cast<double>(rGlobalChildRect.GetWidth());
double fYScale = static_cast<double>(rClientRect.GetHeight()) / static_cast<double>(rGlobalChildRect.GetHeight());
double fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
More information about the Libreoffice-commits
mailing list