sw/source/ui/misc/glosdoc.cxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit efdcb1692b48612fb7ad95f6385e7372fc06d891 Author: Caolán McNamara <caol...@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;
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits