diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 6aed09b970ea..f4903a57f1db 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -967,13 +967,8 @@ bool StgDirStrm::Store() void* StgDirStrm::GetEntry( sal_Int32 n, bool bDirty ) { - if( n < 0 ) - return NULL; - - n *= STGENTRY_SIZE; - if( n >= nSize ) - return NULL; - return GetPtr( n, true, bDirty ); + return n < 0 || n >= nSize / STGENTRY_SIZE + ? NULL : GetPtr( n * STGENTRY_SIZE, true, bDirty ); } // Find a dir entry. |