diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 15:59:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 20:24:09 +0100 |
commit | b21c8faf6f54451d1f8cd08bca0359d62440bc3d (patch) | |
tree | 9b8464ce649b269934db9f000d5cff0b74441fb6 /sw/source | |
parent | 20a639f34f524fa455382bd31a8c4351bc46e6bb (diff) |
ofz#4921 limit column check to max legal column index
Change-Id: I8ddc08aa951dfe9d5c5dd36c47a63c86a834588c
Reviewed-on: https://gerrit.libreoffice.org/47328
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 0e70d550f67f..ef14cddc3787 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); } |