[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Wed Dec 9 04:10:14 PST 2015
lotuswordpro/source/filter/lwpsilverbullet.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 36d55980b1b3498fecc460d3c46667e5f5a17b8e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 9 12:09:37 2015 +0000
guard against corrupt SilverBullet
Change-Id: I3af47ab3af5e28a865a77a592f6a92edb46e4f2b
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index cb0a532..01a9253 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();
More information about the Libreoffice-commits
mailing list