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…
Reference in New Issue