ole32: Don't treat the header as a big block in StorageImpl_LoadFileHeader.
The header is always 512 bytes, regardless of the big block size.
This commit is contained in:
parent
671136693b
commit
7f3211f383
|
@ -3290,26 +3290,31 @@ static void StorageImpl_SetNextBlockInChain(
|
|||
/******************************************************************************
|
||||
* Storage32Impl_LoadFileHeader
|
||||
*
|
||||
* This method will read in the file header, i.e. big block index -1.
|
||||
* This method will read in the file header
|
||||
*/
|
||||
static HRESULT StorageImpl_LoadFileHeader(
|
||||
StorageImpl* This)
|
||||
{
|
||||
HRESULT hr = STG_E_FILENOTFOUND;
|
||||
BYTE headerBigBlock[BIG_BLOCK_SIZE];
|
||||
BOOL success;
|
||||
HRESULT hr;
|
||||
BYTE headerBigBlock[HEADER_SIZE];
|
||||
int index;
|
||||
ULARGE_INTEGER offset;
|
||||
DWORD bytes_read;
|
||||
|
||||
TRACE("\n");
|
||||
/*
|
||||
* Get a pointer to the big block of data containing the header.
|
||||
*/
|
||||
success = StorageImpl_ReadBigBlock(This, -1, headerBigBlock);
|
||||
offset.u.HighPart = 0;
|
||||
offset.u.LowPart = 0;
|
||||
hr = StorageImpl_ReadAt(This, offset, headerBigBlock, HEADER_SIZE, &bytes_read);
|
||||
if (SUCCEEDED(hr) && bytes_read != HEADER_SIZE)
|
||||
hr = STG_E_FILENOTFOUND;
|
||||
|
||||
/*
|
||||
* Extract the information from the header.
|
||||
*/
|
||||
if (success)
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
/*
|
||||
* Check for the "magic number" signature and return an error if it is not
|
||||
|
|
|
@ -79,6 +79,8 @@ static const ULONG DIRENTRY_NULL = 0xFFFFFFFF;
|
|||
|
||||
#define RAW_DIRENTRY_SIZE 0x00000080
|
||||
|
||||
#define HEADER_SIZE 512
|
||||
|
||||
/*
|
||||
* Type of child entry link
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue