diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-18 11:24:18 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-18 20:16:07 +0100 |
commit | a413f18e5be4e95ceaf7cb4335ca9f62ec9693a5 (patch) | |
tree | 26751b4b5652dd9673db8c1702b3af41baf4b237 /sw | |
parent | 8d25fde680beb9dafb7c9c861b5c00d1ae4f4985 (diff) |
SwTxtNode::CutImpl: check for max text limit
Unfortunately i don't see an easy way to handle the problem, let's hope
it doesn't happen in practice.
Change-Id: I86e58c241fda6d07d83fb383421f0a5a810b581a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 77ac029c1bd3..99f720410f34 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1984,6 +1984,11 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0, m_Text.copy(nTxtStartIdx, nLen)); m_Text = m_Text.replaceAt(nTxtStartIdx, nLen, ""); + if (m_Text.getLength() > TXTNODE_MAX) + { // FIXME: could only happen when called from SwRedline::Show. + // unfortunately can't really do anything here to handle that... + abort(); + } nLen = pDest->m_Text.getLength() - nInitSize; // update w/ current size! if( !nLen ) // String nicht gewachsen ?? return; |