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
81edd2ac
Commit
81edd2ac
authored
Jan 07, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fixed handling NULL buffer in INTERNET_OPTION_PROXY queries.
parent
4778a5e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
internet.c
dlls/wininet/internet.c
+2
-2
internet.c
dlls/wininet/tests/internet.c
+6
-0
No files found.
dlls/wininet/internet.c
View file @
81edd2ac
...
...
@@ -821,7 +821,7 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe
proxyBytesRequired
=
(
lstrlenW
(
ai
->
proxy
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
ai
->
proxyBypass
)
proxyBypassBytesRequired
=
(
lstrlenW
(
ai
->
proxyBypass
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
size
<
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
)
if
(
!
pi
||
*
size
<
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
)
{
*
size
=
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
;
return
ERROR_INSUFFICIENT_BUFFER
;
...
...
@@ -854,7 +854,7 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe
if
(
ai
->
proxyBypass
)
proxyBypassBytesRequired
=
WideCharToMultiByte
(
CP_ACP
,
0
,
ai
->
proxyBypass
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
*
size
<
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
)
if
(
!
pi
||
*
size
<
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
)
{
*
size
=
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
;
return
ERROR_INSUFFICIENT_BUFFER
;
...
...
dlls/wininet/tests/internet.c
View file @
81edd2ac
...
...
@@ -164,6 +164,12 @@ static void test_InternetQueryOptionA(void)
int
retval
;
BOOL
res
;
SetLastError
(
0xdeadbeef
);
len
=
0xdeadbeef
;
retval
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_PROXY
,
NULL
,
&
len
);
ok
(
!
retval
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Got wrong error %x(%u)
\n
"
,
retval
,
GetLastError
());
ok
(
len
>=
sizeof
(
INTERNET_PROXY_INFO
)
&&
len
!=
0xdeadbeef
,
"len = %u
\n
"
,
len
);
hinet
=
InternetOpenA
(
useragent
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
ok
((
hinet
!=
0x0
),
"InternetOpen Failed
\n
"
);
...
...
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