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
ea6863c1
Commit
ea6863c1
authored
Jul 09, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a couple of buffer overflows.
parent
da94dd4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
http.c
dlls/wininet/http.c
+3
-3
internet.c
dlls/wininet/internet.c
+2
-2
No files found.
dlls/wininet/http.c
View file @
ea6863c1
...
...
@@ -467,7 +467,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession,
lpwhr
->
lpszHostName
=
HTTP_strdup
(
UrlComponents
.
lpszHostName
);
}
else
if
(
NULL
!=
hIC
->
lpszProxy
&&
hIC
->
lpszProxy
[
0
]
!=
0
)
{
char
buf
[
MAXHOSTNAME
];
char
proxy
[
MAXHOSTNAME
+
1
3
];
/* 13
== "http://" + sizeof(port#) + ":/\0" */
char
proxy
[
MAXHOSTNAME
+
1
5
];
/* 15
== "http://" + sizeof(port#) + ":/\0" */
URL_COMPONENTSA
UrlComponents
;
UrlComponents
.
lpszExtraInfo
=
NULL
;
...
...
@@ -481,8 +481,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession,
sprintf
(
proxy
,
"http://%s/"
,
hIC
->
lpszProxy
);
InternetCrackUrlA
(
proxy
,
0
,
0
,
&
UrlComponents
);
if
(
strlen
(
UrlComponents
.
lpszHostName
))
{
/* for constant 1
3
see above */
char
*
url
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpwhs
->
lpszServerName
)
+
strlen
(
lpwhr
->
lpszPath
)
+
1
3
);
/* for constant 1
5
see above */
char
*
url
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpwhs
->
lpszServerName
)
+
strlen
(
lpwhr
->
lpszPath
)
+
1
5
);
if
(
UrlComponents
.
nPort
==
INTERNET_INVALID_PORT_NUMBER
)
UrlComponents
.
nPort
=
INTERNET_DEFAULT_HTTP_PORT
;
...
...
dlls/wininet/internet.c
View file @
ea6863c1
...
...
@@ -1599,7 +1599,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
proxlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pi
->
lpszProxy
,
-
1
,
NULL
,
0
);
prbylen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pi
->
lpszProxyBypass
,
-
1
,
NULL
,
0
);
wlen
=
sizeof
(
*
piw
)
+
proxlen
+
prbylen
;
wbuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
);
wbuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
piw
=
(
LPINTERNET_PROXY_INFOW
)
wbuffer
;
piw
->
dwAccessType
=
pi
->
dwAccessType
;
prox
=
(
LPWSTR
)
&
piw
[
1
];
...
...
@@ -1615,7 +1615,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
case
INTERNET_OPTION_PASSWORD
:
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
dwBufferLength
,
NULL
,
0
);
wbuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
);
wbuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
dwBufferLength
,
wbuffer
,
wlen
);
break
;
...
...
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