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
bfaacf80
Commit
bfaacf80
authored
Aug 29, 2014
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Initialize realloc'ed memory to zero.
parent
0dad47ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
dwrite_private.h
dlls/dwrite/dwrite_private.h
+5
-0
main.c
dlls/dwrite/main.c
+2
-2
No files found.
dlls/dwrite/dwrite_private.h
View file @
bfaacf80
...
...
@@ -34,6 +34,11 @@ static inline void *heap_realloc(void *mem, size_t len)
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
static
inline
void
*
heap_realloc_zero
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
mem
,
len
);
}
static
inline
BOOL
heap_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
...
...
dlls/dwrite/main.c
View file @
bfaacf80
...
...
@@ -468,7 +468,7 @@ static HRESULT WINAPI dwritefactory_RegisterFontCollectionLoader(IDWriteFactory
int
new_count
=
0
;
new_count
=
This
->
loader_count
*
2
;
new_list
=
heap_realloc
(
This
->
loaders
,
new_count
*
sizeof
(
*
This
->
loaders
));
new_list
=
heap_realloc
_zero
(
This
->
loaders
,
new_count
*
sizeof
(
*
This
->
loaders
));
if
(
!
new_list
)
return
E_OUTOFMEMORY
;
...
...
@@ -603,7 +603,7 @@ static HRESULT WINAPI dwritefactory_RegisterFontFileLoader(IDWriteFactory *iface
int
new_count
=
0
;
new_count
=
This
->
file_loader_count
*
2
;
new_list
=
heap_realloc
(
This
->
file_loaders
,
new_count
*
sizeof
(
*
This
->
file_loaders
));
new_list
=
heap_realloc
_zero
(
This
->
file_loaders
,
new_count
*
sizeof
(
*
This
->
file_loaders
));
if
(
!
new_list
)
return
E_OUTOFMEMORY
;
...
...
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