wininet: Fix buffer size calculation in INTERNET_InternetOpenUrlW.

Spotted by Ron Yorston.
This commit is contained in:
Hans Leidekker 2007-03-13 12:42:53 +01:00 committed by Alexandre Julliard
parent 83f1c1df25
commit 13a04ac0a8
1 changed files with 2 additions and 2 deletions

View File

@ -2860,9 +2860,9 @@ HINTERNET WINAPI INTERNET_InternetOpenUrlW(LPWININETAPPINFOW hIC, LPCWSTR lpszUr
if (urlComponents.dwExtraInfoLength) {
WCHAR *path_extra;
DWORD size = urlComponents.dwUrlPathLength + urlComponents.dwExtraInfoLength + 1;
DWORD len = urlComponents.dwUrlPathLength + urlComponents.dwExtraInfoLength + 1;
if (!(path_extra = HeapAlloc(GetProcessHeap(), 0, size)))
if (!(path_extra = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
{
InternetCloseHandle(client);
break;