[PATCH 1/2] winhttp: Indicate that WinHttpCrackUrl should return string pointers
Andrew Eikum
aeikum at codeweavers.com
Wed Aug 31 14:21:00 CDT 2016
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
dlls/winhttp/session.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 30909ff..90e7946 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -1750,6 +1750,8 @@ static char *download_script( const WCHAR *url, DWORD *out_size )
memset( &uc, 0, sizeof(uc) );
uc.dwStructSize = sizeof(uc);
+ uc.dwHostNameLength = -1;
+ uc.dwUrlPathLength = -1;
if (!WinHttpCrackUrl( url, 0, 0, &uc )) return NULL;
if (!(hostname = heap_alloc( (uc.dwHostNameLength + 1) * sizeof(WCHAR) ))) return NULL;
memcpy( hostname, uc.lpszHostName, uc.dwHostNameLength * sizeof(WCHAR) );
--
2.9.3
More information about the wine-patches
mailing list