From 1db501836805b3da00db699ddca892bf5635ccf5 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 14 May 2013 11:35:41 +0200 Subject: Out of bounds substring access Change-Id: I96e2845a17db78345adfb7c3e9e0dea5dbbb0a6b --- sw/source/core/doc/dbgoutsw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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("", RTL_TEXTENCODING_ASCII_US); - aTmpStr += pTxtNode->GetTxt().copy(0, 10); + aTmpStr += pTxtNode->GetTxt().getLength() > 10 ? pTxtNode->GetTxt().copy(0, 10) : pTxtNode->GetTxt(); aTmpStr += String("", RTL_TEXTENCODING_ASCII_US); if (rNode.IsTableNode()) -- cgit