Kaydet (Commit) ca911d1d authored tarafından marc-andre@atc.tcs.com's avatar marc-andre@atc.tcs.com Kaydeden (comit) Caolán McNamara

Fixed core dump and invalid memory access for some edge cases

üst ee5af920
...@@ -909,9 +909,9 @@ void SwDoc::UpdateLinks( sal_Bool bUI ) ...@@ -909,9 +909,9 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
{ {
SfxObjectCreateMode eMode; SfxObjectCreateMode eMode;
sal_uInt16 nLinkMode = getLinkUpdateMode( true ); sal_uInt16 nLinkMode = getLinkUpdateMode( true );
if ( GetDocShell()) {
sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode(); sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
if( GetDocShell() && if( (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
(nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
GetLinkManager().GetLinks().Count() && GetLinkManager().GetLinks().Count() &&
SFX_CREATE_MODE_INTERNAL != SFX_CREATE_MODE_INTERNAL !=
( eMode = GetDocShell()->GetCreateMode()) && ( eMode = GetDocShell()->GetCreateMode()) &&
...@@ -944,6 +944,7 @@ void SwDoc::UpdateLinks( sal_Bool bUI ) ...@@ -944,6 +944,7 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent ); GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
} }
} }
}
} }
......
...@@ -761,7 +761,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, ...@@ -761,7 +761,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
for(nLevelB = 0; nLevelB <= nLevel; ++nLevelB) for(nLevelB = 0; nLevelB <= nLevel; ++nLevelB)
{ {
sal_uInt8 nPos = aOfsNumsXCH[nLevelB]; sal_uInt8 nPos = aOfsNumsXCH[nLevelB];
if (nPos && sNumString.GetChar(nPos-1) < nMaxLevel) if (nPos && nPos < sNumString.Len() && sNumString.GetChar(nPos-1) < nMaxLevel)
{ {
if (rNotReallyThere[nLevelB]) if (rNotReallyThere[nLevelB])
aOfsNumsXCH[nLevelB] = 0; aOfsNumsXCH[nLevelB] = 0;
......
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