From 668d4299b02926f1b7073ef019ec9cc0990e1f69 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Wed, 31 Aug 2016 14:21:00 -0500 Subject: [PATCH] winhttp: Indicate that WinHttpCrackUrl should return string pointers. Signed-off-by: Andrew Eikum Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/winhttp/session.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 30909ffca16..90e7946a27a 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) );