[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source

Caolán McNamara caolanm at redhat.com
Thu Jul 6 20:28:12 UTC 2017


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

New commits:
commit e2be5d28877a817ae302b3dca7af2f71597a912f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 6 08:51:01 2017 +0100

    ofz: stay inside string
    
    Change-Id: Ia0d0ddfce4ee3d5f8763be6804fe52c514375bb3
    Reviewed-on: https://gerrit.libreoffice.org/39629
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 073a2b2aef5c0b579aea8ed203dd9c1c5790b650)
    Reviewed-on: https://gerrit.libreoffice.org/39645
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 497f5445d159..f3211bac3b6b 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -234,7 +234,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
 {
     WW8FormulaListBox aFormula(*this);
 
-    if (rStr[pF->nLCode-1]==0x01)
+    if (pF->nLCode > 0 && rStr.getLength() >= pF->nLCode && rStr[pF->nLCode-1] == 0x01)
         ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_DROPDOWN);
 
     const SvtFilterOptions& rOpt = SvtFilterOptions::Get();


More information about the Libreoffice-commits mailing list