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
e3a94656
Commit
e3a94656
authored
Mar 25, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Move allocation after input validation to fix leaks (Coverity).
parent
c3f5fc58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
cookie.c
dlls/winhttp/cookie.c
+5
-4
No files found.
dlls/winhttp/cookie.c
View file @
e3a94656
...
...
@@ -134,10 +134,6 @@ static cookie_t *parse_cookie( const WCHAR *string )
const
WCHAR
*
p
;
int
len
;
if
(
!
(
cookie
=
heap_alloc_zero
(
sizeof
(
cookie_t
)
)))
return
NULL
;
list_init
(
&
cookie
->
entry
);
if
(
!
(
p
=
strchrW
(
string
,
'='
)))
{
WARN
(
"no '=' in %s
\n
"
,
debugstr_w
(
string
));
...
...
@@ -148,6 +144,11 @@ static cookie_t *parse_cookie( const WCHAR *string )
WARN
(
"empty cookie name in %s
\n
"
,
debugstr_w
(
string
));
return
NULL
;
}
if
(
!
(
cookie
=
heap_alloc_zero
(
sizeof
(
cookie_t
)
)))
return
NULL
;
list_init
(
&
cookie
->
entry
);
len
=
p
-
string
;
if
(
!
(
cookie
->
name
=
heap_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
{
...
...
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