Commit 3566fe60 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed Unicode buffer size bug in CreateUrlCacheEntryW.

parent d78dce70
......@@ -1949,12 +1949,12 @@ BOOL WINAPI CreateUrlCacheEntryW(
CacheDir = (BYTE)(rand() % pHeader->DirectoryCount);
lBufferSize = MAX_PATH * sizeof(CHAR);
lBufferSize = MAX_PATH * sizeof(WCHAR);
URLCache_LocalFileNameToPathW(pContainer, pHeader, szFile, CacheDir, lpszFileName, &lBufferSize);
URLCacheContainer_UnlockIndex(pContainer, pHeader);
for (lpszFileNameNoPath = lpszFileName + lBufferSize / sizeof(CHAR) - 2;
for (lpszFileNameNoPath = lpszFileName + lBufferSize / sizeof(WCHAR) - 2;
lpszFileNameNoPath >= lpszFileName;
--lpszFileNameNoPath)
{
......
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