From 13a04ac0a8cd4d26d90dd5b65881fe37c92ccc29 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 13 Mar 2007 12:42:53 +0100 Subject: [PATCH] wininet: Fix buffer size calculation in INTERNET_InternetOpenUrlW. Spotted by Ron Yorston. --- dlls/wininet/internet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index e11fcb77e24..6345a5b8905 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -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; -- 2.11.4.GIT