From 34e951bd7284d2e771c279e3adc3899d191fdad0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 9 Oct 2013 21:01:15 +0200 Subject: More OUString::copy out-of-bounds fixes Change-Id: I45762d167d04252e32155a7b23a3290688bccdf6 --- sfx2/source/appl/linkmgr2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 0faf85372adc..a49d49b087c0 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -246,7 +246,7 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink, if( pLinkStr ) *pLinkStr = sRange; if( pFilter ) - *pFilter = sLNm.copy( nPos ); + *pFilter = nPos == -1 ? OUString() : sLNm.copy(nPos); if( pType ) { -- cgit