Commit 108a61f8 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

shlwapi: Take sizeof(WCHAR) into account when allocating Unicode string.

parent ba026b16
......@@ -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)))
......
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