Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e0c7741d
Commit
e0c7741d
authored
Apr 27, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't use INTERNET_MAX_* macros in parse_proxy_url.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
72f5c3f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
internet.c
dlls/wininet/internet.c
+13
-22
No files found.
dlls/wininet/internet.c
View file @
e0c7741d
...
...
@@ -521,41 +521,32 @@ static void free_global_proxy( void )
static
BOOL
parse_proxy_url
(
proxyinfo_t
*
info
,
const
WCHAR
*
url
)
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
WCHAR
hostname
[
INTERNET_MAX_HOST_NAME_LENGTH
];
WCHAR
username
[
INTERNET_MAX_USER_NAME_LENGTH
];
WCHAR
password
[
INTERNET_MAX_PASSWORD_LENGTH
];
URL_COMPONENTSW
uc
;
hostname
[
0
]
=
username
[
0
]
=
password
[
0
]
=
0
;
memset
(
&
uc
,
0
,
sizeof
(
uc
)
);
uc
.
dwStructSize
=
sizeof
(
uc
);
uc
.
lpszHostName
=
hostname
;
uc
.
dwHostNameLength
=
INTERNET_MAX_HOST_NAME_LENGTH
;
uc
.
lpszUserName
=
username
;
uc
.
dwUserNameLength
=
INTERNET_MAX_USER_NAME_LENGTH
;
uc
.
lpszPassword
=
password
;
uc
.
dwPasswordLength
=
INTERNET_MAX_PASSWORD_LENGTH
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
'.'
,
'*'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
URL_COMPONENTSW
uc
=
{
sizeof
(
uc
)};
uc
.
dwHostNameLength
=
1
;
uc
.
dwUserNameLength
=
1
;
uc
.
dwPasswordLength
=
1
;
if
(
!
InternetCrackUrlW
(
url
,
0
,
0
,
&
uc
))
return
FALSE
;
if
(
!
hostname
[
0
]
)
if
(
!
uc
.
dwHostNameLength
)
{
if
(
!
(
info
->
proxy
=
heap_strdupW
(
url
)))
return
FALSE
;
info
->
proxyUsername
=
NULL
;
info
->
proxyPassword
=
NULL
;
return
TRUE
;
}
if
(
!
(
info
->
proxy
=
heap_alloc
(
(
strlenW
(
hostname
)
+
12
)
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
sprintfW
(
info
->
proxy
,
fmt
,
hostn
ame
,
uc
.
nPort
);
if
(
!
(
info
->
proxy
=
heap_alloc
(
(
uc
.
dwHostNameLength
+
12
)
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
sprintfW
(
info
->
proxy
,
fmt
,
uc
.
dwHostNameLength
,
uc
.
lpszHostN
ame
,
uc
.
nPort
);
if
(
!
u
sername
[
0
]
)
info
->
proxyUsername
=
NULL
;
else
if
(
!
(
info
->
proxyUsername
=
heap_str
dupW
(
username
)))
if
(
!
u
c
.
dwUserNameLength
)
info
->
proxyUsername
=
NULL
;
else
if
(
!
(
info
->
proxyUsername
=
heap_str
ndupW
(
uc
.
lpszUserName
,
uc
.
dwUserNameLength
)))
{
heap_free
(
info
->
proxy
);
return
FALSE
;
}
if
(
!
password
[
0
]
)
info
->
proxyPassword
=
NULL
;
else
if
(
!
(
info
->
proxyPassword
=
heap_str
dupW
(
password
)))
if
(
!
uc
.
dwPasswordLength
)
info
->
proxyPassword
=
NULL
;
else
if
(
!
(
info
->
proxyPassword
=
heap_str
ndupW
(
uc
.
lpszPassword
,
uc
.
dwPasswordLength
)))
{
heap_free
(
info
->
proxyUsername
);
heap_free
(
info
->
proxy
);
...
...
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