diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-28 21:15:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-28 21:18:36 +0000 |
commit | f2573a3f1bd50d4bbc6dffaac17c7ba10d6fd6a3 (patch) | |
tree | 3ba25f84de536d0d91b1419d31ed48ed62ec58e3 /filter | |
parent | 4a7f011f0c4da80f2109d779e68ee569c8061b30 (diff) |
ofz#6617 Integer-overflow
Change-Id: I4fc99ef32e769222164b30373acc5c387a922b88
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |