summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-01-04 15:32:03 +0000
committerOliver Bolte <obo@openoffice.org>2008-01-04 15:32:03 +0000
commit6d3c4980bc9d9ab73106b78ec02a52afb6f481a1 (patch)
tree934cc76bc4c3439ae9b44f4b5aade3585c721b7e /sot/source
parent6065ed7af9089043ad4864469ac5041af138cb29 (diff)
INTEGRATION: CWS fwk77 (1.10.20); FILE MERGED
2007/10/29 06:32:38 mav 1.10.20.1: #i82994# integrate the patch
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/sdstor/stgdir.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 3a30141cc1b2..bddbcbc64824 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: stgdir.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: ihi $ $Date: 2007-04-19 09:24:37 $
+ * last change: $Author: obo $ $Date: 2008-01-04 16:32:03 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -45,6 +45,7 @@
#include "stgdir.hxx"
#include "stgio.hxx"
+
//////////////////////////// class StgDirEntry /////////////////////////////
// This class holds the dir entry data and maintains dirty flags for both
@@ -817,6 +818,7 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
{
BOOL bOk(FALSE);
StgDirEntry* pCur = new StgDirEntry( p, &bOk );
+
if( !bOk )
{
delete pCur;
@@ -833,9 +835,17 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
INT32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
// substorage?
INT32 nLeaf = STG_FREE;
- if( pCur->aEntry.GetType() == STG_STORAGE
- || pCur->aEntry.GetType() == STG_ROOT )
+ if( pCur->aEntry.GetType() == STG_STORAGE || pCur->aEntry.GetType() == STG_ROOT )
+ {
nLeaf = pCur->aEntry.GetLeaf( STG_CHILD );
+ if (nLeaf != STG_FREE && nLeaf == n)
+ {
+ delete pCur;
+ rIo.SetError( SVSTREAM_GENERALERROR );
+ return;
+ }
+ }
+
if( nLeaf != 0 && nLeft != 0 && nRight != 0 )
{
if( StgAvlNode::Insert