sot/qa/cppunit/data/pass/loop-1.compound |binary sot/source/sdstor/stgdir.cxx | 18 ++++++------------ 2 files changed, 6 insertions(+), 12 deletions(-)
New commits: commit 9e83222bb1bf18ebcfa354f958606677a63ab1d9 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 14 16:11:40 2017 +0000 check full chain upwards Change-Id: I3a620824b987bf78eaabffa913a3a62a842ba0d9 Reviewed-on: https://gerrit.libreoffice.org/35193 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sot/qa/cppunit/data/pass/loop-1.compound b/sot/qa/cppunit/data/pass/loop-1.compound new file mode 100644 index 0000000..eddb916 Binary files /dev/null and b/sot/qa/cppunit/data/pass/loop-1.compound differ diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index a4c682d..7d49622 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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits