diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-24 16:53:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-24 16:53:57 +0000 |
commit | efdcb1692b48612fb7ad95f6385e7372fc06d891 (patch) | |
tree | 6a5bc895c57e8b63260b7c61d0b8b2ca8ad62df7 /sw/source | |
parent | 49846da1652661e73acffd1ee8df0419aadf5cdb (diff) |
check glossary path for sanity
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/misc/glosdoc.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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; |