summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-16 10:24:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-03-16 10:25:41 +0000
commiteca17faebdeb1a1dc305ffc9273e533eb880d4da (patch)
tree97cfa6062208ed7122a5e56f958a255d575f00fd
parentResolves: tdf#98473 replace || with ‖ to avoid illegal gtk3 action names (diff)
downloadcore-eca17faebdeb1a1dc305ffc9273e533eb880d4da.tar.gz
core-eca17faebdeb1a1dc305ffc9273e533eb880d4da.zip
ubsan: load of value 768, which is not a valid value for type
Change-Id: Ief0b70f19630d8d8cc925145848c7a2c8a2813ad
-rw-r--r--lotuswordpro/source/filter/lwpoverride.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpoverride.cxx b/lotuswordpro/source/filter/lwpoverride.cxx
index d78de247d746..5856a4c8db42 100644
--- a/lotuswordpro/source/filter/lwpoverride.cxx
+++ b/lotuswordpro/source/filter/lwpoverride.cxx
@@ -338,7 +338,9 @@ void LwpSpacingCommonOverride::Read(LwpObjectStream* pStrm)
if (pStrm->QuickReadBool())
{
ReadCommon(pStrm);
- m_nSpacingType = static_cast<SpacingType>(pStrm->QuickReaduInt16());
+ const sal_uInt16 nSpacingType = pStrm->QuickReaduInt16();
+ //only the bottom pair of bits matter
+ m_nSpacingType = static_cast<SpacingType>(nSpacingType & 0x3);
m_nAmount = pStrm->QuickReadInt32();
m_nMultiple = pStrm->QuickReadInt32();
}