shlwapi: Check for NULL string in UrlIs.
This commit is contained in:
parent
5f6d99f513
commit
4811167410
|
@ -1048,6 +1048,15 @@ static void test_UrlCreateFromPath(void)
|
||||||
|
|
||||||
/* ########################### */
|
/* ########################### */
|
||||||
|
|
||||||
|
static void test_UrlIs_null(DWORD flag)
|
||||||
|
{
|
||||||
|
BOOL ret;
|
||||||
|
ret = pUrlIsA(NULL, flag);
|
||||||
|
ok(ret == FALSE, "pUrlIsA(NULL, %d) failed\n", flag);
|
||||||
|
ret = pUrlIsW(NULL, flag);
|
||||||
|
ok(ret == FALSE, "pUrlIsW(NULL, %d) failed\n", flag);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_UrlIs(void)
|
static void test_UrlIs(void)
|
||||||
{
|
{
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -1059,6 +1068,14 @@ static void test_UrlIs(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_UrlIs_null(URLIS_APPLIABLE);
|
||||||
|
test_UrlIs_null(URLIS_DIRECTORY);
|
||||||
|
test_UrlIs_null(URLIS_FILEURL);
|
||||||
|
test_UrlIs_null(URLIS_HASQUERY);
|
||||||
|
test_UrlIs_null(URLIS_NOHISTORY);
|
||||||
|
test_UrlIs_null(URLIS_OPAQUE);
|
||||||
|
test_UrlIs_null(URLIS_URL);
|
||||||
|
|
||||||
for(i = 0; i < sizeof(TEST_PATH_IS_URL) / sizeof(TEST_PATH_IS_URL[0]); i++) {
|
for(i = 0; i < sizeof(TEST_PATH_IS_URL) / sizeof(TEST_PATH_IS_URL[0]); i++) {
|
||||||
MultiByteToWideChar(CP_ACP, 0, TEST_PATH_IS_URL[i].path, -1, wurl, 80);
|
MultiByteToWideChar(CP_ACP, 0, TEST_PATH_IS_URL[i].path, -1, wurl, 80);
|
||||||
|
|
||||||
|
|
|
@ -1719,6 +1719,9 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
|
||||||
|
|
||||||
TRACE("(%s %d)\n", debugstr_a(pszUrl), Urlis);
|
TRACE("(%s %d)\n", debugstr_a(pszUrl), Urlis);
|
||||||
|
|
||||||
|
if(!pszUrl)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch (Urlis) {
|
switch (Urlis) {
|
||||||
|
|
||||||
case URLIS_OPAQUE:
|
case URLIS_OPAQUE:
|
||||||
|
@ -1769,6 +1772,9 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
|
||||||
|
|
||||||
TRACE("(%s %d)\n", debugstr_w(pszUrl), Urlis);
|
TRACE("(%s %d)\n", debugstr_w(pszUrl), Urlis);
|
||||||
|
|
||||||
|
if(!pszUrl)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch (Urlis) {
|
switch (Urlis) {
|
||||||
|
|
||||||
case URLIS_OPAQUE:
|
case URLIS_OPAQUE:
|
||||||
|
|
Loading…
Reference in New Issue