Kaydet (Commit) ad4ca547 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3803 Integer-overflow

Change-Id: Id10ab04340449c990d384041dd6631ba84c5296f
Reviewed-on: https://gerrit.libreoffice.org/43836Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 06533a4b
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
#include <svtools/embedhlp.hxx> #include <svtools/embedhlp.hxx>
#include <o3tl/enumrange.hxx> #include <o3tl/enumrange.hxx>
#include <o3tl/make_unique.hxx> #include <o3tl/make_unique.hxx>
#include <o3tl/safeint.hxx>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <algorithm> #include <algorithm>
...@@ -833,11 +834,15 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi ...@@ -833,11 +834,15 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
} }
} }
sal_Int32 nFontDirection = GetPropertyValue( DFF_Prop_cdirFont, mso_cdir0 ); sal_Int32 nFontDirection = GetPropertyValue( DFF_Prop_cdirFont, mso_cdir0 );
nTextRotationAngle -= nFontDirection * 9000;
if ( ( nFontDirection == 1 ) || ( nFontDirection == 3 ) ) if ( ( nFontDirection == 1 ) || ( nFontDirection == 3 ) )
{ {
bVerticalText = !bVerticalText; 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 ); aTextObj.SetVertical( bVerticalText );
if ( pRet ) if ( pRet )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment