From 3566fe60a8abb3624820de8b81bcc5d7fb23e76d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 15 Nov 2005 16:56:04 +0000 Subject: [PATCH] Fixed Unicode buffer size bug in CreateUrlCacheEntryW. --- dlls/wininet/urlcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index bfe0f33533d..80a5510dd3c 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -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) {