summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/stgdir.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source/sdstor/stgdir.cxx')
-rw-r--r--sot/source/sdstor/stgdir.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index f093dc60cbe7..039a29fd2683 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -936,8 +936,11 @@ BOOL StgDirStrm::Store()
void* StgDirStrm::GetEntry( INT32 n, BOOL bDirty )
{
+ if( n < 0 )
+ return NULL;
+
n *= STGENTRY_SIZE;
- if( n >= nSize )
+ if( n < 0 && n >= nSize )
return NULL;
return GetPtr( n, TRUE, bDirty );
}