[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Fri Sep 22 16:09:38 UTC 2017
sw/source/filter/ww8/ww8par.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit a395698d3df12d1deaec25b31ae02e019a281867
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 22 13:12:40 2017 +0100
ofz#3466 avoid oom
Change-Id: I79f7390dda9c087ae4bc5af9855b72e888e284a1
Reviewed-on: https://gerrit.libreoffice.org/42641
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1de95d3a4067..f1b2ef2d9e28 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3985,7 +3985,10 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
sal_uInt8 nDropLines = 0;
SwCharFormat* pNewSwCharFormat = nullptr;
const SwCharFormat* pFormat = nullptr;
- m_pStrm->Seek(m_xSBase->WW8Cp2Fc(nStartCp + nCpOfs, &m_bIsUnicode));
+
+ bool bValidPos = checkSeek(*m_pStrm, m_xSBase->WW8Cp2Fc(nStartCp + nCpOfs, &m_bIsUnicode));
+ if (!bValidPos)
+ return false;
WW8_CP l = nStartCp;
const WW8_CP nMaxPossible = WW8_CP_MAX-nStartCp;
More information about the Libreoffice-commits
mailing list