mirror of
https://github.com/reactos/wine.git
synced 2025-01-21 03:15:18 +00:00
shlwapi: Take sizeof(WCHAR) into account when allocating Unicode string.
This commit is contained in:
parent
ba026b1634
commit
108a61f8e7
@ -332,7 +332,8 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
|
||||
}
|
||||
|
||||
nByteLen = (lstrlenW(pszUrl) + 1) * sizeof(WCHAR); /* length in bytes */
|
||||
lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0, INTERNET_MAX_URL_LENGTH);
|
||||
lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0,
|
||||
INTERNET_MAX_URL_LENGTH * sizeof(WCHAR));
|
||||
|
||||
if((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszFile)
|
||||
&& !memcmp(wszFile, pszUrl, sizeof(wszFile)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user