summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-14 11:35:41 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-05-14 11:36:06 +0200
commit1db501836805b3da00db699ddca892bf5635ccf5 (patch)
tree86a525bbfdfb09528985e7c59412d557c1de8b3b /sw
parent8c7d865226c80397274b767c95c3fc1df4a774b8 (diff)
Out of bounds substring access
Change-Id: I96e2845a17db78345adfb7c3e9e0dea5dbbb0a6b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index ac3643817a8f..efd10b7d5bdc 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -567,7 +567,7 @@ static String lcl_dbg_out(const SwNode & rNode)
const SfxItemSet * pAttrSet = pTxtNode->GetpSwAttrSet();
aTmpStr += String("<txt>", RTL_TEXTENCODING_ASCII_US);
- aTmpStr += pTxtNode->GetTxt().copy(0, 10);
+ aTmpStr += pTxtNode->GetTxt().getLength() > 10 ? pTxtNode->GetTxt().copy(0, 10) : pTxtNode->GetTxt();
aTmpStr += String("</txt>", RTL_TEXTENCODING_ASCII_US);
if (rNode.IsTableNode())