sot/qa/cppunit/data/pass/fdo41642-3.compound |binary sot/source/sdstor/stgdir.cxx | 11 +++++++++++ 2 files changed, 11 insertions(+)
New commits: commit c2ad33a233d7458909fc18a23c02bd2c6e298940 Author: Wei Ming Khoo <wm...@cam.ac.uk> Date: Wed Feb 29 13:01:35 2012 +0000 fix storage chain loop Signed-off-by: Caolan McNamara <caol...@redhat.com> Signed-off-by: Michael Meeks <michael.me...@suse.com> diff --git a/sot/qa/cppunit/data/pass/fdo41642-3.compound b/sot/qa/cppunit/data/pass/fdo41642-3.compound new file mode 100644 index 0000000..46a9e84 Binary files /dev/null and b/sot/qa/cppunit/data/pass/fdo41642-3.compound differ diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 4f9ef46..ccc7b17 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -826,6 +826,17 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper ) return; } + if (pUpper) + { + StgDirEntry *pUpperUpper = pUpper->pUp; + if (pUpperUpper && pUpperUpper->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"); + delete pCur; + return; + } + } + if( StgAvlNode::Insert ( (StgAvlNode**) ( pUpper ? &pUpper->pDown : &pRoot ), pCur ) ) { _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits