Zebediah Figura : shlwapi: URL schemes may contain hyphen, plus, or period.
Alexandre Julliard
julliard at winehq.org
Fri Sep 22 15:49:05 CDT 2017
Module: wine
Branch: master
Commit: 3559c261c142eff8d500c6ca443672b17ea162db
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3559c261c142eff8d500c6ca443672b17ea162db
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Sep 21 14:49:46 2017 -0500
shlwapi: URL schemes may contain hyphen, plus, or period.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shlwapi/tests/url.c | 1 +
dlls/shlwapi/url.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index f1c0965..ac896b0 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -1483,6 +1483,7 @@ static const struct parse_url_test_t {
{"ab-://www.winehq.org/",S_OK,3,URL_SCHEME_UNKNOWN},
{" http://www.winehq.org/",URL_E_INVALID_SYNTAX},
{"HTTP://www.winehq.org/",S_OK,4,URL_SCHEME_HTTP},
+ {"a+-.://www.winehq.org/",S_OK,4,URL_SCHEME_UNKNOWN},
};
static void test_ParseURL(void)
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index bda4eb2..c7d717b 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -169,7 +169,7 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
if(y->cbSize != sizeof(*y))
return E_INVALIDARG;
- while(*ptr && (isalnum(*ptr) || *ptr == '-'))
+ while(*ptr && (isalnum(*ptr) || *ptr == '-' || *ptr == '+' || *ptr == '.'))
ptr++;
if (*ptr != ':' || ptr <= x+1) {
@@ -203,7 +203,7 @@ HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
if(y->cbSize != sizeof(*y))
return E_INVALIDARG;
- while(*ptr && (isalnumW(*ptr) || *ptr == '-'))
+ while(*ptr && (isalnumW(*ptr) || *ptr == '-' || *ptr == '+' || *ptr == '.'))
ptr++;
if (*ptr != ':' || ptr <= x+1) {
More information about the wine-cvs
mailing list