winhttp: Indicate that WinHttpCrackUrl should return string pointers.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2016-08-31 14:21:00 -05:00 committed by Alexandre Julliard
parent 4358f7c39e
commit 668d4299b0

View File

@ -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) );