Kaydet (Commit) 9e83222b authored tarafından Caolán McNamara's avatar Caolán McNamara

check full chain upwards

Change-Id: I3a620824b987bf78eaabffa913a3a62a842ba0d9
Reviewed-on: https://gerrit.libreoffice.org/35193Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 69def929
......@@ -800,23 +800,17 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper )
if( nLeaf != 0 && nLeft != 0 && nRight != 0 )
{
//fdo#41642 Do we need to check full chain upwards for loops ?
if (pUpper)
//fdo#41642
StgDirEntry *pUp = pUpper;
while (pUp)
{
if (pUpper->m_aEntry.GetLeaf(STG_CHILD) == nLeaf)
if (pUp->m_aEntry.GetLeaf(STG_CHILD) == nLeaf)
{
OSL_FAIL("Leaf node of upper StgDirEntry is same as current StgDirEntry's leaf node. Circular entry chain, discarding link");
delete pCur;
return;
}
StgDirEntry *pUpperUpper = pUpper->m_pUp;
if (pUpperUpper && pUpperUpper->m_aEntry.GetLeaf(STG_CHILD) == nLeaf)
{
OSL_FAIL("Leaf node of upper-upper StgDirEntry is same as current StgDirEntry's leaf node. Circular entry chain, discarding link");
SAL_WARN("sot", "Leaf node of upper StgDirEntry is same as current StgDirEntry's leaf node. Circular entry chain, discarding link");
delete pCur;
return;
}
pUp = pUp->m_pUp;
}
if( StgAvlNode::Insert
......
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