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
7cd30faa
Commit
7cd30faa
authored
Aug 09, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Don't make a copy of the string in add_request_headers().
parent
6a84877c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
request.c
dlls/winhttp/request.c
+4
-8
No files found.
dlls/winhttp/request.c
View file @
7cd30faa
...
...
@@ -455,23 +455,20 @@ DWORD process_header( struct request *request, const WCHAR *field, const WCHAR *
DWORD
add_request_headers
(
struct
request
*
request
,
const
WCHAR
*
headers
,
DWORD
len
,
DWORD
flags
)
{
DWORD
ret
=
ERROR_WINHTTP_INVALID_HEADER
;
WCHAR
*
buffer
,
*
p
,
*
q
;
struct
header
*
header
;
const
WCHAR
*
p
,
*
q
;
if
(
len
==
~
0u
)
len
=
lstrlenW
(
headers
);
if
(
!
len
)
return
ERROR_SUCCESS
;
if
(
!
(
buffer
=
malloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
return
ERROR_OUTOFMEMORY
;
memcpy
(
buffer
,
headers
,
len
*
sizeof
(
WCHAR
)
);
buffer
[
len
]
=
0
;
p
=
buffer
;
p
=
headers
;
do
{
const
WCHAR
*
end
;
if
(
!*
p
)
break
;
if
(
p
>=
headers
+
len
)
break
;
for
(
q
=
p
;
*
q
&&
*
q
!=
'\r'
&&
*
q
!=
'\n'
;
++
q
)
for
(
q
=
p
;
q
<
headers
+
len
&&
*
q
!=
'\r'
&&
*
q
!=
'\n'
;
++
q
)
;
end
=
q
;
while
(
*
q
==
'\r'
||
*
q
==
'\n'
)
...
...
@@ -485,7 +482,6 @@ DWORD add_request_headers( struct request *request, const WCHAR *headers, DWORD
p
=
q
;
}
while
(
!
ret
);
free
(
buffer
);
return
ret
;
}
...
...
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