summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-06 08:51:01 +0100
committerAndras Timar <andras.timar@collabora.com>2017-07-12 10:53:25 +0200
commitb8c84562702f21d7a9f37981e12309dda5243c31 (patch)
treef678fd0744d1103fd26040f0a94c4e9fd5919734
parent5e202bddea9042a0a546c33621a0ca28f7125fab (diff)
ofz: stay inside string
Change-Id: Ia0d0ddfce4ee3d5f8763be6804fe52c514375bb3 Reviewed-on: https://gerrit.libreoffice.org/39629 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 073a2b2aef5c0b579aea8ed203dd9c1c5790b650) Reviewed-on: https://gerrit.libreoffice.org/39645 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e2be5d28877a817ae302b3dca7af2f71597a912f)
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
1 files changed, 1 insertions, 1 deletions
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();