You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/08/22 14:38:02 UTC

svn commit: r1516435 - /openoffice/trunk/main/sot/source/sdstor/stgelem.cxx

Author: orw
Date: Thu Aug 22 12:38:02 2013
New Revision: 1516435

URL: http://svn.apache.org/r1516435
Log:
122935: storage handling: adjust header field checking
        to import Microsoft Office documents in binary format created by Pages


Modified:
    openoffice/trunk/main/sot/source/sdstor/stgelem.cxx

Modified: openoffice/trunk/main/sot/source/sdstor/stgelem.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sot/source/sdstor/stgelem.cxx?rev=1516435&r1=1516434&r2=1516435&view=diff
==============================================================================
--- openoffice/trunk/main/sot/source/sdstor/stgelem.cxx (original)
+++ openoffice/trunk/main/sot/source/sdstor/stgelem.cxx Thu Aug 22 12:38:02 2013
@@ -198,7 +198,7 @@ sal_Bool StgHeader::Check()
             && nTOCstrm >= 0
             && nThreshold > 0
             && ( nDataFAT == STG_EOF || ( nDataFAT >= 0 && nDataFATSize > 0 ) )
-            && ( nMasterChain == STG_EOF || ( nMasterChain >=0 && nMaster > 0 ) )
+            && ( nMasterChain == STG_FREE || nMasterChain == STG_EOF || ( nMasterChain >=0 && nMaster > 0 ) )
             && nMaster >= 0;
 }
 
@@ -438,7 +438,7 @@ sal_Bool StgEntry::Load( const void* pFr
 		n = ( n >> 1 ) - 1;
 	if ( n > 31 || 
          (nSize < 0 && cType != STG_STORAGE) || 
-         ( nPage1 < 0 && nPage1 != STG_EOF ) )
+         ( nPage1 < 0 && nPage1 != STG_FREE && nPage1 != STG_EOF ) )
     {
         // the size makes no sence for the substorage
         // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb