Kaydet (Commit) b9e24ca6 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

avoid another hang with certain .docs

(cherry picked from commit 0592da19)

Change-Id: If16e90c5ba1a43ceb9702e752835928da7b3ef32
Reviewed-on: https://gerrit.libreoffice.org/17657Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 4315f4b9
This diff was suppressed by a .gitattributes entry.
......@@ -2286,7 +2286,7 @@ void SwWW8ImplReader::Read_HdFtText(WW8_CP nStart, WW8_CP nLen, SwFrameFormat* p
bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
{
// Each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd
return (nHeaderCP < m_pWwFib->ccpHdr);
return (nHeaderCP < m_pWwFib->ccpHdr && nHeaderCP >= 0);
}
bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
......@@ -2304,7 +2304,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIh
{
bool bOk = true;
if( m_bVer67 )
bOk = ( m_pHdFt->GetTextPos(grpfIhdt, nI, start, nLen ) && nLen >= 2 );
bOk = ( m_pHdFt->GetTextPos(grpfIhdt, nI, start, nLen ) && start >= 0 && nLen >= 2 );
else
{
m_pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment