diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 08:51:01 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-07-06 23:16:21 +0200 |
commit | 571dea70574294d75051a37fa4f5eef5e9ed5cbc (patch) | |
tree | c74389ada3976851f19b8a5bc0bf19d82f60740b /sw | |
parent | 2d66c7d4e710a4407b4d6685b3b41f3841d6da11 (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/39644
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index af4ef9a58bbc..397c664ad71c 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -221,7 +221,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(); |