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
6762313c
Commit
6762313c
authored
Apr 25, 2005
by
Maxime Bellengé
Committed by
Alexandre Julliard
Apr 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent CreateDCA from crashing if a bad lpInitData parameter is
provided.
parent
26d2b8bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
dc.c
dlls/gdi/dc.c
+9
-3
No files found.
dlls/gdi/dc.c
View file @
6762313c
...
...
@@ -38,6 +38,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dc
);
static
const
WCHAR
displayW
[]
=
{
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
0
};
static
BOOL
DC_DeleteObject
(
HGDIOBJ
handle
,
void
*
obj
);
static
const
struct
gdi_obj_funcs
dc_funcs
=
...
...
@@ -670,8 +672,13 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
if
(
output
)
RtlCreateUnicodeStringFromAsciiz
(
&
outputW
,
output
);
else
outputW
.
Buffer
=
NULL
;
if
(
initData
)
initDataW
=
GdiConvertToDevmodeW
(
initData
);
else
initDataW
=
NULL
;
initDataW
=
NULL
;
if
(
initData
)
{
/* don't convert initData for DISPLAY driver, it's not used */
if
(
!
driverW
.
Buffer
||
strcmpiW
(
driverW
.
Buffer
,
displayW
))
initDataW
=
GdiConvertToDevmodeW
(
initData
);
}
ret
=
CreateDCW
(
driverW
.
Buffer
,
deviceW
.
Buffer
,
outputW
.
Buffer
,
initDataW
);
...
...
@@ -725,7 +732,6 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
}
else
{
static
const
WCHAR
displayW
[]
=
{
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
0
};
funcs
=
DRIVER_load_driver
(
displayW
);
physDev
=
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