[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Wed Oct 25 19:30:04 UTC 2017
filter/source/msfilter/svdfppt.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit ad4ca547e57858d0051d89f1b4799ed8cbbe2ffa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 25 14:22:04 2017 +0100
ofz#3803 Integer-overflow
Change-Id: Id10ab04340449c990d384041dd6631ba84c5296f
Reviewed-on: https://gerrit.libreoffice.org/43836
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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 )
{
More information about the Libreoffice-commits
mailing list