diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 12:09:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 12:09:37 +0000 |
commit | 36d55980b1b3498fecc460d3c46667e5f5a17b8e (patch) | |
tree | c3f42459bbd11ca788889f472ae1e85ae7df0622 | |
parent | c88a23b9d44118e96de41a70ab7f87eb0aafb126 (diff) |
guard against corrupt SilverBullet
Change-Id: I3af47ab3af5e28a865a77a592f6a92edb46e4f2b
-rw-r--r-- | lotuswordpro/source/filter/lwpsilverbullet.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx index cb0a532f4cb3..01a92530cbf5 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.cxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx @@ -94,6 +94,9 @@ void LwpSilverBullet::Read() sal_uInt16 nNumPos = m_pObjStrm->QuickReaduInt16(); + if (nNumPos > SAL_N_ELEMENTS(m_pResetPositionFlags)) + throw std::range_error("corrupt SilverBullet"); + for (sal_uInt16 nC = 0; nC < nNumPos; nC++) m_pResetPositionFlags[nC] = m_pObjStrm->QuickReaduInt8(); |