Commit 668d4299 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winhttp: Indicate that WinHttpCrackUrl should return string pointers.

parent 4358f7c3
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment