From efdcb1692b48612fb7ad95f6385e7372fc06d891 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 24 Nov 2011 16:53:29 +0000 Subject: check glossary path for sanity --- sw/source/ui/misc/glosdoc.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw') diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index 3db77a08cb31..37012381a9dd 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -220,6 +220,8 @@ void SwGlossaries::PutGroupDoc(SwTextBlocks *pBlock) { sal_Bool SwGlossaries::NewGroupDoc(String& rGroupName, const String& rTitle) { sal_uInt16 nNewPath = (sal_uInt16)rGroupName.GetToken(1, GLOS_DELIM).ToInt32(); + if(nNewPath >= m_pPathArr->Count()) + return sal_False; String sNewFilePath(*(*m_pPathArr)[nNewPath]); String sNewGroup = lcl_CheckFileName(sNewFilePath, rGroupName.GetToken(0, GLOS_DELIM)); sNewGroup += GLOS_DELIM; -- cgit