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
c79be420
Commit
c79be420
authored
May 12, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
May 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: CreateUri should return E_INVALIDARG for NULL args.
parent
3aa93e11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
uri.c
dlls/urlmon/tests/uri.c
+18
-1
uri.c
dlls/urlmon/uri.c
+8
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
c79be420
...
...
@@ -20,7 +20,9 @@
/*
* IUri testing framework goals:
* - Test invalid flags
* - Test invalid args
* - invalid flags
* - invalid args (IUri, uri string)
* - Test parsing for components when no canonicalization occurs
* - Test parsing for components when canonicalization occurs.
* - More tests...
...
...
@@ -75,6 +77,18 @@ static void test_CreateUri_InvalidFlags(void) {
}
}
static
void
test_CreateUri_InvalidArgs
(
void
)
{
HRESULT
hr
;
IUri
*
uri
=
(
void
*
)
0xdeadbeef
;
hr
=
pCreateUri
(
http_urlW
,
0
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CreateUri returned 0x%08x, expected 0x%08x
\n
"
,
hr
,
E_INVALIDARG
);
hr
=
pCreateUri
(
NULL
,
0
,
0
,
&
uri
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CreateUri returned 0x%08x, expected 0x%08x
\n
"
,
hr
,
E_INVALIDARG
);
ok
(
uri
==
NULL
,
"Error: Expected the IUri to be NULL, but it was %p instead
\n
"
,
uri
);
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -88,4 +102,7 @@ START_TEST(uri) {
trace
(
"test CreateUri invalid flags...
\n
"
);
test_CreateUri_InvalidFlags
();
trace
(
"test CreateUri invalid args...
\n
"
);
test_CreateUri_InvalidArgs
();
}
dlls/urlmon/uri.c
View file @
c79be420
...
...
@@ -296,6 +296,14 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU
TRACE
(
"(%s %x %x %p)
\n
"
,
debugstr_w
(
pwzURI
),
dwFlags
,
(
DWORD
)
dwReserved
,
ppURI
);
if
(
!
ppURI
)
return
E_INVALIDARG
;
if
(
!
pwzURI
)
{
*
ppURI
=
NULL
;
return
E_INVALIDARG
;
}
ret
=
heap_alloc
(
sizeof
(
Uri
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
...
...
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