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
8710dde0
Commit
8710dde0
authored
Mar 29, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Mar 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In a call to EnumEnhMetaFile when hdc is NULL, lpRect may be NULL. Add
a test for this.
parent
9be7f278
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
enhmetafile.c
dlls/gdi/enhmetafile.c
+3
-3
metafile.c
dlls/gdi/tests/metafile.c
+5
-0
No files found.
dlls/gdi/enhmetafile.c
View file @
8710dde0
...
...
@@ -2147,7 +2147,7 @@ BOOL WINAPI EnumEnhMetaFile(
INT
mapMode
=
MM_TEXT
;
COLORREF
old_text_color
=
0
,
old_bk_color
=
0
;
if
(
!
lpRect
)
if
(
!
lpRect
&&
hdc
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
...
...
@@ -2228,7 +2228,7 @@ BOOL WINAPI EnumEnhMetaFile(
CombineTransform
(
&
info
->
init_transform
,
&
savedXform
,
&
info
->
init_transform
);
}
if
(
WIDTH
(
emh
->
rclFrame
)
&&
HEIGHT
(
emh
->
rclFrame
)
)
if
(
lpRect
&&
WIDTH
(
emh
->
rclFrame
)
&&
HEIGHT
(
emh
->
rclFrame
)
)
{
FLOAT
xSrcPixSize
,
ySrcPixSize
,
xscale
,
yscale
;
XFORM
xform
;
...
...
@@ -2256,7 +2256,7 @@ BOOL WINAPI EnumEnhMetaFile(
}
/* WinNT resets the current vp/win org/ext */
if
(
!
IS_WIN9X
()
)
if
(
!
IS_WIN9X
()
&&
hdc
)
{
SetMapMode
(
hdc
,
MM_TEXT
);
SetWindowOrgEx
(
hdc
,
0
,
0
,
NULL
);
...
...
dlls/gdi/tests/metafile.c
View file @
8710dde0
...
...
@@ -43,6 +43,8 @@ static int CALLBACK emf_enum_proc(HDC hdc, HANDLETABLE *handle_table,
trace
(
"hdc %p, emr->iType %ld, emr->nSize %ld, param %p
\n
"
,
hdc
,
emr
->
iType
,
emr
->
nSize
,
(
void
*
)
param
);
if
(
!
hdc
)
return
1
;
PlayEnhMetaFileRecord
(
hdc
,
handle_table
,
emr
,
n_objs
);
switch
(
emr
->
iType
)
...
...
@@ -190,6 +192,9 @@ static void test_ExtTextOut(void)
ok
(
!
EnumEnhMetaFile
(
hdcDisplay
,
hMetafile
,
emf_enum_proc
,
dx
,
NULL
),
"A valid hdc has to require a valid rc
\n
"
);
ok
(
EnumEnhMetaFile
(
NULL
,
hMetafile
,
emf_enum_proc
,
dx
,
NULL
),
"A null hdc does not require a valid rc
\n
"
);
ret
=
DeleteEnhMetaFile
(
hMetafile
);
ok
(
ret
,
"DeleteEnhMetaFile error %ld
\n
"
,
GetLastError
());
ret
=
ReleaseDC
(
hwnd
,
hdcDisplay
);
...
...
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