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
22c51eea
Commit
22c51eea
authored
Jul 20, 2015
by
Daniel Lehman
Committed by
Alexandre Julliard
Jul 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Check for NULL pointer in GetOutlineTextMetrics.
parent
5c000dca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
freetype.c
dlls/gdi32/freetype.c
+1
-1
font.c
dlls/gdi32/tests/font.c
+5
-0
No files found.
dlls/gdi32/freetype.c
View file @
22c51eea
...
...
@@ -7722,7 +7722,7 @@ static UINT freetype_GetOutlineTextMetrics( PHYSDEV dev, UINT cbSize, OUTLINETEX
if
(
physdev
->
font
->
potm
||
get_outline_text_metrics
(
physdev
->
font
))
{
if
(
cbSize
>=
physdev
->
font
->
potm
->
otmSize
)
if
(
potm
&&
cbSize
>=
physdev
->
font
->
potm
->
otmSize
)
{
memcpy
(
potm
,
physdev
->
font
->
potm
,
physdev
->
font
->
potm
->
otmSize
);
scale_outline_font_metrics
(
physdev
->
font
,
potm
);
...
...
dlls/gdi32/tests/font.c
View file @
22c51eea
...
...
@@ -2147,6 +2147,11 @@ static void test_GetOutlineTextMetrics(void)
}
ok
(
otm
->
otmpFullName
==
unset_ptr
,
"expected %p got %p
\n
"
,
unset_ptr
,
otm
->
otmpFullName
);
/* check handling of NULL pointer */
SetLastError
(
0xdeadbeef
);
ret
=
GetOutlineTextMetricsA
(
hdc
,
otm_size
,
NULL
);
ok
(
ret
==
otm_size
,
"expected %u, got %u, error %d
\n
"
,
otm_size
,
ret
,
GetLastError
());
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
SelectObject
(
hdc
,
hfont_old
);
...
...
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