diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-03 16:52:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-03 21:48:23 +0100 |
commit | 102c0cc175602d1bca654813cc184f52e80f94cb (patch) | |
tree | 1e6857b935ff6744433a1655b2950d9f7cc60b2b | |
parent | ba7191ed0d4da2f5a2ebd2ef40387b26145860f1 (diff) |
ofz#6702 Integer-overflow
Change-Id: I68edb7b6f508eac3102ff1584c14675e5e167ff4
Reviewed-on: https://gerrit.libreoffice.org/50682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 89404f1a986a..76f67d63f3b6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1576,8 +1576,8 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt const OUString sViewBox( "ViewBox" ); aViewBox.X = GetPropertyValue( DFF_Prop_geoLeft, 0 ); aViewBox.Y = GetPropertyValue( DFF_Prop_geoTop, 0 ); - aViewBox.Width = nCoordWidth = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_geoRight, 21600 )) - aViewBox.X; - aViewBox.Height = nCoordHeight = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_geoBottom, 21600 )) - aViewBox.Y; + aViewBox.Width = nCoordWidth = o3tl::saturating_sub<sal_Int32>(GetPropertyValue(DFF_Prop_geoRight, 21600), aViewBox.X); + aViewBox.Height = nCoordHeight = o3tl::saturating_sub<sal_Int32>(GetPropertyValue(DFF_Prop_geoBottom, 21600), aViewBox.Y); aProp.Name = sViewBox; aProp.Value <<= aViewBox; aPropVec.push_back( aProp ); |