diff options
-rw-r--r-- | sot/qa/cppunit/data/pass/loop-1.compound | bin | 0 -> 3584 bytes | |||
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 18 |
2 files changed, 6 insertions, 12 deletions
diff --git a/sot/qa/cppunit/data/pass/loop-1.compound b/sot/qa/cppunit/data/pass/loop-1.compound Binary files differnew file mode 100644 index 000000000000..eddb9164c920 --- /dev/null +++ b/sot/qa/cppunit/data/pass/loop-1.compound diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index a4c682df3855..7d496223e29e 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -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 |