Commit 213bfd27 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

urlmon: Fix HttpProtocol_Start and strndupW to work properly with native wininet.

parent efdee19d
......@@ -190,8 +190,9 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
static inline LPWSTR strndupW(LPWSTR string, int len)
{
LPWSTR ret = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR));
if (ret)
LPWSTR ret = NULL;
if (string &&
(ret = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR))) != NULL)
{
memcpy(ret, string, len*sizeof(WCHAR));
ret[len] = 0;
......@@ -304,7 +305,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
url.dwStructSize = sizeof(url);
url.dwSchemeLength = url.dwHostNameLength = url.dwUrlPathLength = url.dwUserNameLength =
url.dwPasswordLength = 1;
if (!InternetCrackUrlW(szUrl, 0, ICU_ESCAPE, &url))
if (!InternetCrackUrlW(szUrl, 0, 0, &url))
{
hres = MK_E_SYNTAX;
goto done;
......
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