mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fix string length bugs in GWinHttpFile (#580347)
This commit is contained in:
parent
a859f883cf
commit
dbe7408a5c
@ -387,12 +387,12 @@ g_winhttp_file_resolve_relative_path (GFile *file,
|
||||
child = g_object_new (G_TYPE_WINHTTP_FILE, NULL);
|
||||
child->vfs = winhttp_file->vfs;
|
||||
child->url = winhttp_file->url;
|
||||
child->url.lpszScheme = g_memdup (winhttp_file->url.lpszScheme, winhttp_file->url.dwSchemeLength*2);
|
||||
child->url.lpszHostName = g_memdup (winhttp_file->url.lpszHostName, winhttp_file->url.dwHostNameLength*2);
|
||||
child->url.lpszUserName = g_memdup (winhttp_file->url.lpszUserName, winhttp_file->url.dwUserNameLength*2);
|
||||
child->url.lpszPassword = g_memdup (winhttp_file->url.lpszPassword, winhttp_file->url.dwPasswordLength*2);
|
||||
child->url.lpszScheme = g_memdup (winhttp_file->url.lpszScheme, (winhttp_file->url.dwSchemeLength+1)*2);
|
||||
child->url.lpszHostName = g_memdup (winhttp_file->url.lpszHostName, (winhttp_file->url.dwHostNameLength+1)*2);
|
||||
child->url.lpszUserName = g_memdup (winhttp_file->url.lpszUserName, (winhttp_file->url.dwUserNameLength+1)*2);
|
||||
child->url.lpszPassword = g_memdup (winhttp_file->url.lpszPassword, (winhttp_file->url.dwPasswordLength+1)*2);
|
||||
child->url.lpszUrlPath = wnew_path;
|
||||
child->url.dwUrlPathLength = 2*(wcslen (wnew_path)+1);
|
||||
child->url.dwUrlPathLength = wcslen (wnew_path);
|
||||
child->url.lpszExtraInfo = NULL;
|
||||
child->url.dwExtraInfoLength = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user