summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-25 14:22:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-25 21:29:41 +0200
commitad4ca547e57858d0051d89f1b4799ed8cbbe2ffa (patch)
tree7d8a11d23df0884241e749a2183bf56788074bb9 /filter
parent06533a4b9d2d249e2e16c6870de9ff29d590bb96 (diff)
ofz#3803 Integer-overflow
Change-Id: Id10ab04340449c990d384041dd6631ba84c5296f Reviewed-on: https://gerrit.libreoffice.org/43836 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 373ec9aaa7ff..64576db867cf 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -120,6 +120,7 @@
#include <svtools/embedhlp.hxx>
#include <o3tl/enumrange.hxx>
#include <o3tl/make_unique.hxx>
+#include <o3tl/safeint.hxx>
#include <boost/optional.hpp>
#include <algorithm>
@@ -833,11 +834,15 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
}
}
sal_Int32 nFontDirection = GetPropertyValue( DFF_Prop_cdirFont, mso_cdir0 );
- nTextRotationAngle -= nFontDirection * 9000;
if ( ( nFontDirection == 1 ) || ( nFontDirection == 3 ) )
{
bVerticalText = !bVerticalText;
}
+ const bool bFail = o3tl::checked_multiply(nFontDirection, 9000, nFontDirection);
+ if (!bFail)
+ nTextRotationAngle -= nFontDirection;
+ else
+ SAL_WARN("filter.ms", "Parsing error: bad fontdirection: " << nFontDirection);
aTextObj.SetVertical( bVerticalText );
if ( pRet )
{