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

This commit is contained in:
Juan Lang 2009-12-03 18:19:00 -08:00 committed by Alexandre Julliard
parent ec769d2d95
commit b967fde0a8
2 changed files with 2 additions and 2 deletions

View File

@ -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))

View File

@ -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,