Commit b967fde0 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Correct length of data passed to callback when resolving a name.

parent ec769d2d
......@@ -2535,7 +2535,7 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
}
SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_RESOLVING_NAME,
(LPWSTR) lpszServerName, strlenW(lpszServerName));
(LPWSTR) lpszServerName, (strlenW(lpszServerName)+1) * sizeof(WCHAR));
sock_namelen = sizeof(socketAddr);
if (!GetAddress(lpszServerName, lpwfs->serverport, (struct sockaddr *)&socketAddr, &sock_namelen))
......
......@@ -1389,7 +1389,7 @@ static DWORD HTTP_ResolveName(http_request_t *lpwhr)
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RESOLVING_NAME,
lpwhs->lpszServerName,
strlenW(lpwhs->lpszServerName)+1);
(strlenW(lpwhs->lpszServerName)+1) * sizeof(WCHAR));
lpwhs->sa_len = sizeof(lpwhs->socketAddress);
if (!GetAddress(lpwhs->lpszServerName, lpwhs->nServerPort,
......
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