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
e92cca8d
Commit
e92cca8d
authored
May 19, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Validate URL and output pointer in CreateURLMoniker.
parent
1943d84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
url.c
dlls/urlmon/tests/url.c
+20
-0
umon.c
dlls/urlmon/umon.c
+6
-0
No files found.
dlls/urlmon/tests/url.c
View file @
e92cca8d
...
...
@@ -242,6 +242,26 @@ static void test_CreateURLMoniker(LPCWSTR url1, LPCWSTR url2)
IMoniker
*
mon1
=
NULL
;
IMoniker
*
mon2
=
NULL
;
hr
=
CreateURLMoniker
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
mon1
=
(
IMoniker
*
)
0xdeadbeef
;
hr
=
CreateURLMoniker
(
NULL
,
NULL
,
&
mon1
);
ok
(
hr
==
E_INVALIDARG
,
"Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
ok
(
mon1
==
NULL
,
"Expected the output pointer to be NULL, got %p
\n
"
,
mon1
);
hr
=
CreateURLMoniker
(
NULL
,
emptyW
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
hr
=
CreateURLMoniker
(
NULL
,
emptyW
,
&
mon1
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
MK_E_SYNTAX
),
/* IE5/IE5.01/IE6 SP2 */
"Expected CreateURLMoniker to return S_OK, got 0x%08x
\n
"
,
hr
);
if
(
mon1
)
IMoniker_Release
(
mon1
);
hr
=
CreateURLMoniker
(
NULL
,
url1
,
&
mon1
);
ok
(
SUCCEEDED
(
hr
),
"failed to create moniker: 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
...
...
dlls/urlmon/umon.c
View file @
e92cca8d
...
...
@@ -513,6 +513,12 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
TRACE
(
"(%p, %s, %p, %08x)
\n
"
,
pmkContext
,
debugstr_w
(
szURL
),
ppmk
,
dwFlags
);
if
(
ppmk
)
*
ppmk
=
NULL
;
if
(
!
szURL
||
!
ppmk
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_MK_UNIFORM
)
FIXME
(
"ignoring flag URL_MK_UNIFORM
\n
"
);
if
(
!
(
obj
=
alloc_moniker
()))
...
...
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