From 035f5f1d98ca7468193998bbb7c890dce32ea17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 24 Oct 2017 15:53:45 +0100 Subject: [PATCH] ofz#3771 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iedc61de56b494d6344490f6d6f712a62b2a12b78 Reviewed-on: https://gerrit.libreoffice.org/43783 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/filter/ww8/ww8scan.cxx | 3 +++ 1 file changed, 3 insertions(+) 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))