Kaydet (Commit) fcae5e41 authored tarafından Miklos Vajna's avatar Miklos Vajna

Related: i#86517 avoid crash on invalid LEVELTEXT

üst 0218f147
...@@ -2794,7 +2794,11 @@ int RTFDocumentImpl::popState() ...@@ -2794,7 +2794,11 @@ int RTFDocumentImpl::popState()
// The first character is the length of the string (the rest should be ignored). // The first character is the length of the string (the rest should be ignored).
sal_Int32 nLength(aStr.toChar()); sal_Int32 nLength(aStr.toChar());
OUString aValue = aStr.copy(1, nLength); OUString aValue;
if (nLength <= aStr.getLength())
aValue = aStr.copy(1, nLength);
else
aValue = aStr;
RTFValue::Pointer_t pValue(new RTFValue(aValue, true)); RTFValue::Pointer_t pValue(new RTFValue(aValue, true));
m_aStates.top().aTableAttributes->push_back(make_pair(NS_ooxml::LN_CT_LevelText_val, pValue)); m_aStates.top().aTableAttributes->push_back(make_pair(NS_ooxml::LN_CT_LevelText_val, pValue));
......
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