summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-06 08:51:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-06 13:03:51 +0200
commit073a2b2aef5c0b579aea8ed203dd9c1c5790b650 (patch)
tree22ed1f8f5db492b80b4655844332da8853f98528
parent4f7b2ca221efe9f198994c98ac4603c9e4688f11 (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>
-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 c732c0831786..28368e8dae7f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -220,7 +220,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
{
WW8FormulaListBox aFormula(*this);
- if (rStr[pF->nLCode-1]==0x01)
+ if (pF->nLCode && rStr.getLength() >= pF->nLCode && rStr[pF->nLCode-1] == 0x01)
ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_DROPDOWN);
const SvtFilterOptions& rOpt = SvtFilterOptions::Get();