Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
48111674
Commit
48111674
authored
Apr 09, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Check for NULL string in UrlIs.
parent
5f6d99f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
url.c
dlls/shlwapi/tests/url.c
+17
-0
url.c
dlls/shlwapi/url.c
+6
-0
No files found.
dlls/shlwapi/tests/url.c
View file @
48111674
...
...
@@ -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
)
{
BOOL
ret
;
...
...
@@ -1059,6 +1068,14 @@ static void test_UrlIs(void)
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
++
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
TEST_PATH_IS_URL
[
i
].
path
,
-
1
,
wurl
,
80
);
...
...
dlls/shlwapi/url.c
View file @
48111674
...
...
@@ -1719,6 +1719,9 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
TRACE
(
"(%s %d)
\n
"
,
debugstr_a
(
pszUrl
),
Urlis
);
if
(
!
pszUrl
)
return
FALSE
;
switch
(
Urlis
)
{
case
URLIS_OPAQUE
:
...
...
@@ -1769,6 +1772,9 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
TRACE
(
"(%s %d)
\n
"
,
debugstr_w
(
pszUrl
),
Urlis
);
if
(
!
pszUrl
)
return
FALSE
;
switch
(
Urlis
)
{
case
URLIS_OPAQUE
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment