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
dcf1a81d
Commit
dcf1a81d
authored
Nov 15, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Accept a missing buffer when parsing a decoded URL.
parent
96f2e713
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
url.c
dlls/winhttp/tests/url.c
+18
-3
url.c
dlls/winhttp/url.c
+1
-1
No files found.
dlls/winhttp/tests/url.c
View file @
dcf1a81d
...
...
@@ -67,8 +67,8 @@ static const WCHAR url11[] =
'@'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
':'
,
'4'
,
'4'
,
'3'
,
'/'
,
's'
,
'i'
,
't'
,
'e'
,
'/'
,
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
'?'
,
'q'
,
'u'
,
'e'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
url12
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'e'
,
'x'
,
'a'
,
'm'
,
'p'
,
'l'
,
'e'
,
'.'
,
'n'
,
'e'
,
't'
,
'/'
,
'p'
,
'a'
,
't'
,
'h'
,
'?'
,
'v'
,
'a'
,
'r'
,
'1'
,
'='
,
'e'
,
'x'
,
'a'
,
'm'
,
'p'
,
'l'
,
'e'
,
'@'
,
'e'
,
'x'
,
'a'
,
'm'
,
'p'
,
'l'
,
'e'
,
'.'
,
'c'
,
'o'
,
'm'
,
'&'
,
'v'
,
'a'
,
'r'
,
'2'
,
'='
,
'x'
,
'&'
,
'v'
,
'a'
,
'r'
,
'3'
,
'='
,
'y'
,
0
};
static
const
WCHAR
url13
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
':'
,
'/'
,
'/'
,
't'
,
'o'
,
'o'
,
'l'
,
's'
,
'.'
,
'g'
,
'o'
,
'o'
,
'g'
,
'l'
,
'e'
,
'.'
,
'c'
,
'o'
,
'm'
,
'/'
,
's'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'/'
,
'u'
,
'p'
,
'd'
,
'a'
,
't'
,
'e'
,
'2'
,
'?'
,
'w'
,
'='
,
'3'
,
':'
,
'B'
,
'x'
,
'D'
,
'H'
,
'o'
,
'W'
,
'y'
,
'8'
,
'e'
,
'z'
,
'M'
,
0
};
static
const
WCHAR
url_k1
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'u'
,
's'
,
'e'
,
'r'
,
'n'
,
'a'
,
'm'
,
'e'
,
':'
,
'p'
,
'a'
,
's'
,
's'
,
'w'
,
'o'
,
'r'
,
'd'
,
...
...
@@ -570,7 +570,6 @@ static void WinHttpCrackUrl_test( void )
reset_url_components
(
&
uc
);
ret
=
WinHttpCrackUrl
(
url12
,
0
,
0
,
&
uc
);
ok
(
ret
,
"WinHttpCrackUrl failed
\n
"
);
ok
(
uc
.
nScheme
==
INTERNET_SCHEME_HTTP
,
"unexpected scheme
\n
"
);
ok
(
uc
.
lpszScheme
==
url12
,
"unexpected scheme
\n
"
);
...
...
@@ -584,6 +583,22 @@ static void WinHttpCrackUrl_test( void )
ok
(
uc
.
dwUrlPathLength
==
5
,
"unexpected path length
\n
"
);
ok
(
uc
.
lpszExtraInfo
==
url12
+
23
,
"unexpected extra info
\n
"
);
ok
(
uc
.
dwExtraInfoLength
==
39
,
"unexpected extra info length
\n
"
);
uc
.
lpszScheme
=
scheme
;
uc
.
dwSchemeLength
=
20
;
uc
.
lpszHostName
=
host
;
uc
.
dwHostNameLength
=
20
;
uc
.
lpszUserName
=
NULL
;
uc
.
dwUserNameLength
=
0
;
uc
.
lpszPassword
=
NULL
;
uc
.
dwPasswordLength
=
0
;
uc
.
lpszUrlPath
=
path
;
uc
.
dwUrlPathLength
=
40
;
uc
.
lpszExtraInfo
=
NULL
;
uc
.
dwExtraInfoLength
=
0
;
uc
.
nPort
=
0
;
ret
=
WinHttpCrackUrl
(
url13
,
0
,
ICU_DECODE
,
&
uc
);
ok
(
ret
,
"WinHttpCrackUrl failed
\n
"
);
}
START_TEST
(
url
)
...
...
dlls/winhttp/url.c
View file @
dcf1a81d
...
...
@@ -38,7 +38,7 @@ static BOOL set_component( WCHAR **str, DWORD *str_len, WCHAR *value, DWORD len,
{
if
(
!*
str
)
{
if
(
len
&&
(
flags
&
ICU_DECODE
))
if
(
len
&&
*
str_len
&&
(
flags
&
ICU_DECODE
))
{
set_last_error
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
...
...
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