Module: wine Branch: master Commit: 13a04ac0a8cd4d26d90dd5b65881fe37c92ccc29 URL: http://source.winehq.org/git/wine.git/?a=commit;h=13a04ac0a8cd4d26d90dd5b658...
Author: Hans Leidekker hans@it.vu.nl Date: Tue Mar 13 12:42:53 2007 +0100
wininet: Fix buffer size calculation in INTERNET_InternetOpenUrlW.
Spotted by Ron Yorston.
---
dlls/wininet/internet.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index e11fcb7..6345a5b 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;