View | Details | Raw Unified | Return to issue 82994
Collapse All | Expand All

(-)source/sdstor/stgdir.cxx (-2 / +14 lines)
Lines 45-50 Link Here
45
#include "stgdir.hxx"
45
#include "stgdir.hxx"
46
#include "stgio.hxx"
46
#include "stgio.hxx"
47
47
48
#include <stdio.h>
49
48
//////////////////////////// class StgDirEntry /////////////////////////////
50
//////////////////////////// class StgDirEntry /////////////////////////////
49
51
50
// This class holds the dir entry data and maintains dirty flags for both
52
// This class holds the dir entry data and maintains dirty flags for both
Lines 817-822 Link Here
817
    {
819
    {
818
        BOOL bOk(FALSE);
820
        BOOL bOk(FALSE);
819
        StgDirEntry* pCur = new StgDirEntry( p, &bOk );
821
        StgDirEntry* pCur = new StgDirEntry( p, &bOk );
822
820
        if( !bOk )
823
        if( !bOk )
821
        {
824
        {
822
            delete pCur;
825
            delete pCur;
Lines 833-841 Link Here
833
        INT32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
836
        INT32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
834
        // substorage?
837
        // substorage?
835
        INT32 nLeaf = STG_FREE;
838
        INT32 nLeaf = STG_FREE;
836
        if( pCur->aEntry.GetType() == STG_STORAGE
839
        if( pCur->aEntry.GetType() == STG_STORAGE || pCur->aEntry.GetType() == STG_ROOT )
837
            || pCur->aEntry.GetType() == STG_ROOT )
840
        {
838
            nLeaf = pCur->aEntry.GetLeaf( STG_CHILD );
841
            nLeaf = pCur->aEntry.GetLeaf( STG_CHILD );
842
            if (nLeaf != STG_FREE && nLeaf == n)
843
            {
844
                fprintf(stderr, "Child of ole2 storage node is itself! %d\n", nLeaf);
845
                delete pCur;
846
                rIo.SetError( SVSTREAM_GENERALERROR );
847
                return;
848
            }
849
        }
850
839
        if( nLeaf != 0 && nLeft != 0 && nRight != 0 )
851
        if( nLeaf != 0 && nLeft != 0 && nRight != 0 )
840
        {
852
        {
841
            if( StgAvlNode::Insert
853
            if( StgAvlNode::Insert

Return to issue 82994