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
c1c6f4ad
Commit
c1c6f4ad
authored
Aug 09, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Also set last error on NULL first parameter in InternetCreateUrl{A, W}.
parent
d10891ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
internet.c
dlls/wininet/internet.c
+2
-8
url.c
dlls/wininet/tests/url.c
+3
-3
No files found.
dlls/wininet/internet.c
View file @
c1c6f4ad
...
@@ -3663,10 +3663,7 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags,
...
@@ -3663,10 +3663,7 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags,
TRACE
(
"(%p,%d,%p,%p)
\n
"
,
lpUrlComponents
,
dwFlags
,
lpszUrl
,
lpdwUrlLength
);
TRACE
(
"(%p,%d,%p,%p)
\n
"
,
lpUrlComponents
,
dwFlags
,
lpszUrl
,
lpdwUrlLength
);
if
(
!
lpUrlComponents
)
if
(
!
lpUrlComponents
||
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
return
FALSE
;
if
(
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
{
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
return
FALSE
;
...
@@ -3733,10 +3730,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
...
@@ -3733,10 +3730,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
TRACE
(
"(%p,%d,%p,%p)
\n
"
,
lpUrlComponents
,
dwFlags
,
lpszUrl
,
lpdwUrlLength
);
TRACE
(
"(%p,%d,%p,%p)
\n
"
,
lpUrlComponents
,
dwFlags
,
lpszUrl
,
lpdwUrlLength
);
if
(
!
lpUrlComponents
)
if
(
!
lpUrlComponents
||
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
return
FALSE
;
if
(
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
{
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
return
FALSE
;
...
...
dlls/wininet/tests/url.c
View file @
c1c6f4ad
...
@@ -404,11 +404,11 @@ static void InternetCreateUrlA_test(void)
...
@@ -404,11 +404,11 @@ static void InternetCreateUrlA_test(void)
host
[]
=
"host"
;
host
[]
=
"host"
;
/* test NULL lpUrlComponents */
/* test NULL lpUrlComponents */
ret
=
InternetCreateUrlA
(
NULL
,
0
,
NULL
,
&
len
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
InternetCreateUrlA
(
NULL
,
0
,
NULL
,
&
len
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected
0xdeadbeef
, got %d
\n
"
,
GetLastError
());
"Expected
ERROR_INVALID_PARAMETER
, got %d
\n
"
,
GetLastError
());
ok
(
len
==
-
1
,
"Expected len -1, got %d
\n
"
,
len
);
ok
(
len
==
-
1
,
"Expected len -1, got %d
\n
"
,
len
);
/* test zero'ed lpUrlComponents */
/* test zero'ed lpUrlComponents */
...
...
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