[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jul 5 01:49:24 PDT 2011


 sw/source/filter/ww8/ww8par.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cc8eb7ca98373cde039b3cda430840809b8b3fe0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 5 09:49:01 2011 +0100

    ensure linkstrings and aStringIds are both in range

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5254ef5..64b1439 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4415,7 +4415,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
         pWwFib->lcbSttbFnm, bVer67 ? 2 : 0, eStructCharSet,
         aLinkStrings, &aStringIds);
 
-    for (size_t i=0; i < aLinkStrings.size(); ++i)
+    for (size_t i=0; i < aLinkStrings.size() && i < aStringIds.size(); ++i)
     {
         ww::bytes stringId = aStringIds[i];
         WW8_STRINGID *stringIdStruct = (WW8_STRINGID*)(&stringId[0]);


More information about the Libreoffice-commits mailing list