diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-05 15:15:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-05 18:25:30 +0200 |
commit | f37ef60c19d1608f0b597d37d025e401d6c99171 (patch) | |
tree | acc8b1eea1b0af6cd54f0a416a28d956709f48e5 /lotuswordpro | |
parent | 094117fc686e7b5cf05191079f2195155fc3513e (diff) |
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.cxx | 3 |
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(); |