Commit 73419dc4 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Return END_OF_CHAIN for chains starting with special sector values.

parent 00d36ac9
......@@ -6995,10 +6995,8 @@ static ULONG BlockChainStream_GetHeadOfChain(BlockChainStream* This)
This->ownerDirEntry,
&chainEntry);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr) && chainEntry.startingBlock < BLOCK_FIRST_SPECIAL)
return chainEntry.startingBlock;
}
}
return BLOCK_END_OF_CHAIN;
......@@ -7520,11 +7518,8 @@ static ULONG SmallBlockChainStream_GetHeadOfChain(
This->ownerDirEntry,
&chainEntry);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr) && chainEntry.startingBlock < BLOCK_FIRST_SPECIAL)
return chainEntry.startingBlock;
}
}
return BLOCK_END_OF_CHAIN;
......
......@@ -78,6 +78,7 @@ static const WORD MAX_BIG_BLOCK_SIZE_BITS = 0x000c;
static const WORD DEF_SMALL_BLOCK_SIZE_BITS = 0x0006;
static const WORD DEF_BIG_BLOCK_SIZE = 0x0200;
static const WORD DEF_SMALL_BLOCK_SIZE = 0x0040;
static const ULONG BLOCK_FIRST_SPECIAL = 0xFFFFFFFB;
static const ULONG BLOCK_EXTBBDEPOT = 0xFFFFFFFC;
static const ULONG BLOCK_SPECIAL = 0xFFFFFFFD;
static const ULONG BLOCK_END_OF_CHAIN = 0xFFFFFFFE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment