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
d6c0e815
Commit
d6c0e815
authored
Dec 31, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fail on URLs without a scheme.
parent
00b6d8eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
internet.c
dlls/wininet/internet.c
+0
-0
internet.c
dlls/wininet/tests/internet.c
+0
-2
url.c
dlls/wininet/tests/url.c
+21
-2
No files found.
dlls/wininet/internet.c
View file @
d6c0e815
This diff is collapsed.
Click to expand it.
dlls/wininet/tests/internet.c
View file @
d6c0e815
...
...
@@ -655,9 +655,7 @@ static void test_null(void)
ok
(
r
==
FALSE
,
"return wrong
\n
"
);
r
=
InternetSetCookieW
(
szServer
,
NULL
,
szServer
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"wrong error
\n
"
);
}
ok
(
r
==
FALSE
,
"return wrong
\n
"
);
sz
=
0
;
...
...
dlls/wininet/tests/url.c
View file @
d6c0e815
...
...
@@ -160,6 +160,9 @@ static const crack_url_test_t crack_url_tests[] = {
{
"file:///C:/Program%20Files/Atmel/./Asdf.xml"
,
0
,
4
,
INTERNET_SCHEME_FILE
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
36
,
-
1
,
0
,
"file"
,
""
,
""
,
""
,
"C:
\\
Program Files
\\
Atmel
\\
.
\\
Asdf.xml"
,
""
},
{
"C:
\\
file.txt"
,
0
,
1
,
INTERNET_SCHEME_UNKNOWN
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
2
,
9
,
-
1
,
0
,
"C"
,
""
,
""
,
""
,
"
\\
file.txt"
,
""
}
};
static
const
WCHAR
*
w_str_of
(
const
char
*
str
)
...
...
@@ -541,6 +544,7 @@ static void InternetCrackUrl_test(void)
SetLastError
(
0xdeadbeef
);
urlComponents
.
dwStructSize
=
0
;
ret
=
InternetCrackUrlA
(
TEST_URL
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
!=
0xdeadbeef
&&
GLE
!=
ERROR_SUCCESS
,
"Expected GLE to represent a failure
\n
"
);
...
...
@@ -551,8 +555,25 @@ static void InternetCrackUrl_test(void)
SetLastError
(
0xdeadbeef
);
urlComponents
.
dwStructSize
=
sizeof
(
urlComponents
)
+
1
;
ret
=
InternetCrackUrlA
(
TEST_URL
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
!=
0xdeadbeef
&&
GLE
!=
ERROR_SUCCESS
,
"Expected GLE to represent a failure
\n
"
);
SetLastError
(
0xdeadbeef
);
memset
(
&
urlComponents
,
0
,
sizeof
(
urlComponents
));
urlComponents
.
dwStructSize
=
sizeof
(
urlComponents
);
ret
=
InternetCrackUrlA
(
"file.txt"
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"Expected GLE to represent a failure
\n
"
);
SetLastError
(
0xdeadbeef
);
memset
(
&
urlComponents
,
0
,
sizeof
(
urlComponents
));
urlComponents
.
dwStructSize
=
sizeof
(
urlComponents
);
ret
=
InternetCrackUrlA
(
"www.winehq.org"
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"Expected GLE to represent a failure
\n
"
);
}
static
void
InternetCrackUrlW_test
(
void
)
...
...
@@ -690,12 +711,10 @@ static void InternetCrackUrlW_test(void)
comp
.
dwExtraInfoLength
=
sizeof
(
extra
)
/
sizeof
(
extra
[
0
]);
r
=
InternetCrackUrlW
(
url2
,
0
,
0
,
&
comp
);
todo_wine
{
ok
(
!
r
,
"InternetCrackUrl should have failed
\n
"
);
ok
(
GetLastError
()
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"InternetCrackUrl should have failed with error ERROR_INTERNET_UNRECOGNIZED_SCHEME instead of error %d
\n
"
,
GetLastError
());
}
/* Test to see whether cracking a URL without a filename initializes urlpart */
urlpart
[
0
]
=
0xba
;
...
...
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