summaryrefslogtreecommitdiffstats
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-05 15:15:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-05 18:25:30 +0200
commitf37ef60c19d1608f0b597d37d025e401d6c99171 (patch)
treeacc8b1eea1b0af6cd54f0a416a28d956709f48e5 /lotuswordpro
parentofz: fods timeout, set SAX_DISABLE_THREADS (diff)
downloadcore-f37ef60c19d1608f0b597d37d025e401d6c99171.tar.gz
core-f37ef60c19d1608f0b597d37d025e401d6c99171.zip
cid#1490901 silence Out-of-bounds read
Change-Id: I9a2c1fe10fc696d5392cd6c95cff11124b5fdb01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121696 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index e2fa4112d243..629b5affcfb5 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -98,7 +98,8 @@ void LwpSilverBullet::Read()
for (sal_uInt16 nC = 0; nC < nNumPos; nC++)
m_pResetPositionFlags[nC] = m_pObjStrm->QuickReaduInt8();
- std::fill(m_pResetPositionFlags + nNumPos, m_pResetPositionFlags + SAL_N_ELEMENTS(m_pResetPositionFlags), 0);
+ if (nNumPos < SAL_N_ELEMENTS(m_pResetPositionFlags))
+ std::fill(m_pResetPositionFlags + nNumPos, m_pResetPositionFlags + SAL_N_ELEMENTS(m_pResetPositionFlags), 0);
m_nUseCount = m_pObjStrm->QuickReaduInt32();