sw/source/filter/ww8/ww8scan.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 8657e3795d2e0ef0653835e2d56c53512dd43aea Author: Caolán McNamara <caol...@redhat.com> Date: Mon Aug 24 09:37:11 2015 +0100 dismiss bad seek offsets early Change-Id: Ia88bc1833d362547f45e073028203a4de581f3e2 diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 49a6765..313dd78 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -7533,7 +7533,8 @@ SEPr::SEPr() : bool checkSeek(SvStream &rSt, sal_uInt32 nOffset) { - return (rSt.Seek(nOffset) == static_cast<sal_Size>(nOffset)); + return (nOffset != SAL_MAX_UINT32 && + rSt.Seek(nOffset) == static_cast<sal_Size>(nOffset)); } bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength) commit 11e73a0880f64c99aec5059ff6122b831bc1de74 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Aug 24 09:36:42 2015 +0100 fix crash with empty booknames Change-Id: Ifadb2129be53530720cb2023cdc0782b6e737f18 diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index aaa0239..49a6765 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4170,17 +4170,18 @@ bool WW8PLCFx_Book::MapName(OUString& rName) return false; bool bFound = false; - sal_uInt16 i = 0; - do + + size_t i = 0; + while (i < aBookNames.size()) { if (rName.equalsIgnoreAsciiCase(aBookNames[i])) { rName = aBookNames[i]; bFound = true; + break; } ++i; } - while (!bFound && i < pBook[0]->GetIMax()); return bFound; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits