summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
Diffstat (limited to 'sot')
-rw-r--r--sot/qa/cppunit/data/pass/fdo41642-3.compoundbin0 -> 1252352 bytes
-rw-r--r--sot/source/sdstor/stgdir.cxx11
2 files changed, 11 insertions, 0 deletions
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 000000000000..46a9e84d1def
--- /dev/null
+++ b/sot/qa/cppunit/data/pass/fdo41642-3.compound
Binary files differ
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 7bdade90a935..e34e2d53dd24 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -825,6 +825,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 ) )
{