summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-03 15:59:42 +0000
committerMichael Stahl <mstahl@redhat.com>2018-01-03 20:26:23 +0100
commitda866f69a19c0afac0dd202d854b0030d02deb3d (patch)
tree949f5fb50557c3897268812710787a85af01b31d /sw
parentde5d9ffd8879d5a09724fc727a86aae64e3aadc2 (diff)
ofz#4921 limit column check to max legal column index
Change-Id: I8ddc08aa951dfe9d5c5dd36c47a63c86a834588c Reviewed-on: https://gerrit.libreoffice.org/47336 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index a517dffe03ea..54498ea7cc04 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2970,7 +2970,7 @@ bool WW8TabDesc::InFirstParaInCell() const
void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
{
OSL_ENSURE(m_pActBand, "Impossible");
- if (m_pActBand && m_pActBand->maDirections[nWwCol] == 3)
+ if (m_pActBand && nWwCol <= MAX_COL && m_pActBand->maDirections[nWwCol] == 3)
{
m_pIo->m_xCtrlStck->NewAttr(*m_pIo->m_pPaM->GetPoint(),
SvxCharRotateItem(900, false, RES_CHRATR_ROTATE));
@@ -2980,7 +2980,7 @@ void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
void WW8TabDesc::EndMiserableHackForUnsupportedDirection(short nWwCol)
{
OSL_ENSURE(m_pActBand, "Impossible");
- if (m_pActBand && m_pActBand->maDirections[nWwCol] == 3)
+ if (m_pActBand && nWwCol <= MAX_COL && m_pActBand->maDirections[nWwCol] == 3)
m_pIo->m_xCtrlStck->SetAttr(*m_pIo->m_pPaM->GetPoint(), RES_CHRATR_ROTATE);
}