Commit 13a04ac0 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Fix buffer size calculation in INTERNET_InternetOpenUrlW.

Spotted by Ron Yorston.
parent 83f1c1df
......@@ -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;
......
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