[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Nov 24 08:54:36 PST 2011


 sw/source/ui/misc/glosdoc.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit efdcb1692b48612fb7ad95f6385e7372fc06d891
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 16:53:29 2011 +0000

    check glossary path for sanity

diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 3db77a0..3701238 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;


More information about the Libreoffice-commits mailing list