[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sot/qa sot/source

Michael Meeks michael at kemper.freedesktop.org
Wed Feb 29 06:35:28 PST 2012


 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 <wmk26 at cam.ac.uk>
Date:   Wed Feb 29 13:01:35 2012 +0000

    fix storage chain loop
    
    Signed-off-by: Caolan McNamara <caolanm at redhat.com>
    Signed-off-by: Michael Meeks <michael.meeks at 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 ) )
             {


More information about the Libreoffice-commits mailing list