[PATCH] urlmon: Fill in IPv6 address data before calling ipv6_to_number
Alex Henrie
alexhenrie24 at gmail.com
Sun Aug 9 11:18:38 CDT 2020
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49662
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/urlmon/tests/uri.c | 29 ++++++++++++++++++++++++++++-
dlls/urlmon/uri.c | 5 ++---
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c
index 29a70ad481..b1390a35bf 100644
--- a/dlls/urlmon/tests/uri.c
+++ b/dlls/urlmon/tests/uri.c
@@ -7595,7 +7595,34 @@ static const uri_combine_test uri_combine_tests[] = {
{URL_SCHEME_MAILTO,S_OK},
{URLZONE_INVALID,E_NOTIMPL}
}
- }
+ },
+ { "http://[::1]",0,
+ "/",Uri_CREATE_ALLOW_RELATIVE,
+ 0,S_OK,FALSE,
+ {
+ {"http://[::1]/",S_OK},
+ {"[::1]",S_OK},
+ {"http://[::1]/",S_OK},
+ {"",S_FALSE},
+ {"",S_FALSE},
+ {"",S_FALSE},
+ {"::1",S_OK},
+ {"",S_FALSE},
+ {"/",S_OK},
+ {"/",S_OK},
+ {"",S_FALSE},
+ {"http://[::1]/",S_OK},
+ {"http",S_OK},
+ {"",S_FALSE},
+ {"",S_FALSE}
+ },
+ {
+ {Uri_HOST_IPV6,S_OK},
+ {80,S_OK,FALSE,TRUE},
+ {URL_SCHEME_HTTP,S_OK},
+ {URLZONE_INVALID,E_NOTIMPL}
+ }
+ },
};
typedef struct _uri_parse_test {
diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index f490fc0302..50c5012351 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -6523,9 +6523,8 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
}
if(proc_uri->host_start > -1) {
- data.host = proc_uri->canon_uri+proc_uri->host_start;
- data.host_len = proc_uri->host_len;
- data.host_type = proc_uri->host_type;
+ const WCHAR *host = proc_uri->canon_uri+proc_uri->host_start;
+ parse_host(&host, &data, 0, 0);
}
if(proc_uri->has_port) {
--
2.27.0
More information about the wine-devel
mailing list