From d8ba18651cdca6037ee187b586d3c309a9db3528 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jul 2011 12:30:00 +0100 Subject: Related: #i46388# busted ole2 wrapper --- sot/source/sdstor/stgstrms.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index fe40be155b9e..48e8de3ede6d 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -798,7 +798,7 @@ void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty ) if( Pos2Page( Pos ) ) { StgPage* pPg = rIo.Get( nPage, bForce ); - if( pPg ) + if (pPg && nOffset < pPg->GetSize()) { pPg->SetOwner( pEntry ); if( bDirty ) -- cgit