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
82d413d9
Commit
82d413d9
authored
Apr 27, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use heap_strndupAtoW in InternetOpenUrlA.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d282a642
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
internet.c
dlls/wininet/internet.c
+5
-9
No files found.
dlls/wininet/internet.c
View file @
82d413d9
...
...
@@ -3706,9 +3706,8 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
LPCSTR
lpszHeaders
,
DWORD
dwHeadersLength
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
{
HINTERNET
rc
=
NULL
;
DWORD
lenHeaders
=
0
;
LPWSTR
szUrl
=
NULL
;
LPWSTR
szH
eaders
=
NULL
;
WCHAR
*
h
eaders
=
NULL
;
TRACE
(
"
\n
"
);
...
...
@@ -3719,20 +3718,17 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
}
if
(
lpszHeaders
)
{
lenHeaders
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
NULL
,
0
);
szHeaders
=
heap_alloc
(
lenHeaders
*
sizeof
(
WCHAR
));
if
(
!
szHeaders
)
{
headers
=
heap_strndupAtoW
(
lpszHeaders
,
dwHeadersLength
,
&
dwHeadersLength
);
if
(
!
headers
)
{
heap_free
(
szUrl
);
return
NULL
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
szHeaders
,
lenHeaders
);
}
rc
=
InternetOpenUrlW
(
hInternet
,
szUrl
,
szHeaders
,
lenHeaders
,
dwFlags
,
dwContext
);
rc
=
InternetOpenUrlW
(
hInternet
,
szUrl
,
headers
,
dwHeadersLength
,
dwFlags
,
dwContext
);
heap_free
(
szUrl
);
heap_free
(
szH
eaders
);
heap_free
(
h
eaders
);
return
rc
;
}
...
...
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