summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-24 15:53:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-25 09:55:02 +0200
commit035f5f1d98ca7468193998bbb7c890dce32ea17c (patch)
treec2f45c989e4007244f260302d255f89d613bc0e4
parent08deeace490acc5b84b97b92e5960f6b6a920e53 (diff)
ofz#3771 Integer-overflow
Change-Id: Iedc61de56b494d6344490f6d6f712a62b2a12b78 Reviewed-on: https://gerrit.libreoffice.org/43783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index ca018366d22e..970290527f2f 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1534,6 +1534,9 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
if ( ((8 > m_pWw8Fib->m_nVersion) && !pWwF->m_fComplex) || !pWwF->m_lcbClx )
return nullptr;
+ if (pWwF->m_lcbClx < 0)
+ return nullptr;
+
WW8_FC nClxPos = pWwF->m_fcClx;
if (!checkSeek(*pStr, nClxPos))