summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-10 14:33:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-10 14:36:48 +0000
commitd61dd2ef7cee491115d4528a97f56582d4af3e37 (patch)
tree9ac6f14c349ea4166baab1528ec354f647ae5037 /lotuswordpro/source
parentdd33ec2352bdcacd5b1e341fcf598538a224ff9e (diff)
check is within legal bounds
Change-Id: Ie3f9e52575436b9505a412b20c7e1b24fa61f6cb (cherry picked from commit 8410527550ef6db8348e8590eb0c52bccbe40310)
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 071c9715fc91..c709b631c609 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -578,7 +578,10 @@ void LwpTableLayout::RegisterColumns()
LwpColumnLayout * pColumnLayout = dynamic_cast<LwpColumnLayout *>(rColumnID.obj().get());
while (pColumnLayout)
{
- m_pColumns[pColumnLayout->GetColumnID()] = pColumnLayout;
+ auto nColId = pColumnLayout->GetColumnID();
+ if (nColId >= nCols)
+ throw std::range_error("corrupt LwpTableLayout");
+ m_pColumns[nColId] = pColumnLayout;
if (!pColumnLayout->IsJustifiable())
{
pWidthCalculated[pColumnLayout->GetColumnID()] = sal_True;