Commit e4ad164f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

wininet: Set uninitialized memmory to 0xdeadbeef in cache files.

parent edcc395d
......@@ -811,6 +811,8 @@ static BOOL URLCache_FindFirstFreeEntry(URLCACHE_HEADER * pHeader, DWORD dwBlock
for (index = 0; index < dwBlocksNeeded; index++)
URLCache_Allocation_BlockAllocate(AllocationTable, dwBlockNumber + index);
*ppEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + ENTRY_START_OFFSET + dwBlockNumber * BLOCKSIZE);
for (index = 0; index < dwBlocksNeeded * BLOCKSIZE / sizeof(DWORD); index++)
((DWORD*)*ppEntry)[index] = 0xdeadbeef;
(*ppEntry)->dwBlocksUsed = dwBlocksNeeded;
return TRUE;
}
......@@ -1398,6 +1400,7 @@ static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_
pHeader->dwOffsetFirstHashTable = dwOffset;
(*ppHash)->CacheFileEntry.dwSignature = HASH_SIGNATURE;
(*ppHash)->CacheFileEntry.dwBlocksUsed = 0x20;
(*ppHash)->dwAddressNext = 0;
(*ppHash)->dwHashTableNumber = pPrevHash ? pPrevHash->dwHashTableNumber + 1 : 0;
for (i = 0; i < HASHTABLE_SIZE; i++)
{
......
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