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
9fec2e0d
Commit
9fec2e0d
authored
May 27, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix name and data allocation failure handling in alloc_cookie.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
49638070
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
cookie.c
dlls/wininet/cookie.c
+7
-4
No files found.
dlls/wininet/cookie.c
View file @
9fec2e0d
...
...
@@ -238,7 +238,7 @@ static cookie_t *alloc_cookie(substr_t name, substr_t data, FILETIME expiry, FIL
{
cookie_t
*
new_cookie
;
new_cookie
=
heap_alloc
(
sizeof
(
*
new_cookie
));
new_cookie
=
heap_alloc
_zero
(
sizeof
(
*
new_cookie
));
if
(
!
new_cookie
)
return
NULL
;
...
...
@@ -247,9 +247,12 @@ static cookie_t *alloc_cookie(substr_t name, substr_t data, FILETIME expiry, FIL
new_cookie
->
flags
=
flags
;
list_init
(
&
new_cookie
->
entry
);
new_cookie
->
name
=
heap_strndupW
(
name
.
str
,
name
.
len
);
new_cookie
->
data
=
heap_strndupW
(
data
.
str
,
data
.
len
);
if
(
!
new_cookie
->
name
||
!
new_cookie
->
data
)
{
if
(
name
.
str
&&
!
(
new_cookie
->
name
=
heap_strndupW
(
name
.
str
,
name
.
len
)))
{
delete_cookie
(
new_cookie
);
return
NULL
;
}
if
(
data
.
str
&&
!
(
new_cookie
->
data
=
heap_strndupW
(
data
.
str
,
data
.
len
)))
{
delete_cookie
(
new_cookie
);
return
NULL
;
}
...
...
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