Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
addd8e69
Commit
addd8e69
authored
Jul 20, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix cache entry use-after-free (Valgrind).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d06443d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
dwrite_private.h
dlls/dwrite/dwrite_private.h
+1
-0
font.c
dlls/dwrite/font.c
+6
-0
main.c
dlls/dwrite/main.c
+1
-0
No files found.
dlls/dwrite/dwrite_private.h
View file @
addd8e69
...
...
@@ -198,6 +198,7 @@ extern void factory_release_cached_fontface(struct fontfacecached*) DECLSPEC_HID
extern
void
get_logfont_from_font
(
IDWriteFont
*
,
LOGFONTW
*
)
DECLSPEC_HIDDEN
;
extern
void
get_logfont_from_fontface
(
IDWriteFontFace
*
,
LOGFONTW
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteFactory5
*
,
IDWriteGdiInterop1
**
)
DECLSPEC_HIDDEN
;
extern
void
fontface_detach_from_cache
(
IDWriteFontFace4
*
)
DECLSPEC_HIDDEN
;
/* Opentype font table functions */
struct
dwrite_font_props
{
...
...
dlls/dwrite/font.c
View file @
addd8e69
...
...
@@ -443,6 +443,12 @@ static void release_fontfamily_data(struct dwrite_fontfamily_data *data)
heap_free
(
data
);
}
void
fontface_detach_from_cache
(
IDWriteFontFace4
*
iface
)
{
struct
dwrite_fontface
*
fontface
=
impl_from_IDWriteFontFace4
(
iface
);
fontface
->
cached
=
NULL
;
}
static
HRESULT
WINAPI
dwritefontface_QueryInterface
(
IDWriteFontFace4
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
dwrite_fontface
*
This
=
impl_from_IDWriteFontFace4
(
iface
);
...
...
dlls/dwrite/main.c
View file @
addd8e69
...
...
@@ -566,6 +566,7 @@ static void release_fontface_cache(struct list *fontfaces)
LIST_FOR_EACH_ENTRY_SAFE
(
fontface
,
fontface2
,
fontfaces
,
struct
fontfacecached
,
entry
)
{
list_remove
(
&
fontface
->
entry
);
fontface_detach_from_cache
(
fontface
->
fontface
);
heap_free
(
fontface
);
}
}
...
...
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