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>2018-03-02 11:31:44 +0000
commit72bbbcd3dafb4b88180c8a14f554f845c0e6f2af (patch)
tree78ed82c4ed705afe52dd19b049d03fdaf430bd5f
parentb4a6288f4e104e87b31d8e6f9e7173b6f4b69eff (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 58a27bba8ac1..7b1c37c76bdf 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();