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
af77e9b3
Commit
af77e9b3
authored
Jul 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Avoid casting away const.
parent
8ed1f054
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
session.c
dlls/winhttp/session.c
+12
-12
No files found.
dlls/winhttp/session.c
View file @
af77e9b3
...
...
@@ -886,16 +886,16 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
if
(
hdr
->
flags
&
WINHTTP_PROXY_TYPE_PROXY
)
{
BOOL
sane
=
FALSE
;
LPWSTR
proxy
=
NULL
;
LPWSTR
proxy_bypass
=
NULL
;
/* Sanity-check length of proxy string */
if
((
BYTE
*
)
len
-
buf
+
*
len
<=
size
)
{
sane
=
TRUE
;
info
->
lpszProxy
=
GlobalAlloc
(
0
,
(
*
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
info
->
lpszProxy
)
copy_char_to_wchar_sz
(
(
BYTE
*
)(
len
+
1
),
*
len
,
(
LPWSTR
)
info
->
lpszProxy
);
proxy
=
GlobalAlloc
(
0
,
(
*
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
proxy
)
copy_char_to_wchar_sz
(
(
BYTE
*
)(
len
+
1
),
*
len
,
proxy
);
len
=
(
DWORD
*
)((
BYTE
*
)(
len
+
1
)
+
*
len
);
}
if
(
sane
)
...
...
@@ -903,19 +903,19 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
/* Sanity-check length of proxy bypass string */
if
((
BYTE
*
)
len
-
buf
+
*
len
<=
size
)
{
info
->
lpszProxyBypass
=
GlobalAlloc
(
0
,
(
*
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
info
->
lpszProxyBypass
)
copy_char_to_wchar_sz
(
(
BYTE
*
)(
len
+
1
),
*
len
,
(
LPWSTR
)
info
->
lpszProxyBypass
);
proxy_bypass
=
GlobalAlloc
(
0
,
(
*
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
proxy_bypass
)
copy_char_to_wchar_sz
(
(
BYTE
*
)(
len
+
1
),
*
len
,
proxy_bypass
);
}
else
{
sane
=
FALSE
;
GlobalFree
(
(
LPWSTR
)
info
->
lpszP
roxy
);
info
->
lpszP
roxy
=
NULL
;
GlobalFree
(
p
roxy
);
p
roxy
=
NULL
;
}
}
info
->
lpszProxy
=
proxy
;
info
->
lpszProxyBypass
=
proxy_bypass
;
if
(
sane
)
{
got_from_reg
=
TRUE
;
...
...
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