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
4e527045
Commit
4e527045
authored
Nov 21, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't crash in StartDoc on NULL DOCINFO.
parent
a9183c7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
dc.c
dlls/gdi32/dc.c
+18
-3
No files found.
dlls/gdi32/dc.c
View file @
4e527045
...
...
@@ -2155,16 +2155,29 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc )
{
DC_ATTR
*
dc_attr
;
ABORTPROC
proc
;
DOCINFOW
info
;
TRACE
(
"%p %p
\n
"
,
hdc
,
doc
);
if
(
doc
)
{
info
=
*
doc
;
}
else
{
memset
(
&
info
,
0
,
sizeof
(
info
)
);
info
.
cbSize
=
sizeof
(
info
);
}
TRACE
(
"DocName %s, Output %s, Datatype %s, fwType %#lx
\n
"
,
debugstr_w
(
doc
->
lpszDocName
),
debugstr_w
(
doc
->
lpszOutput
),
debugstr_w
(
doc
->
lpszDatatype
),
doc
->
fwType
);
debugstr_w
(
info
.
lpszDocName
),
debugstr_w
(
info
.
lpszOutput
),
debugstr_w
(
info
.
lpszDatatype
),
info
.
fwType
);
if
(
!
(
dc_attr
=
get_dc_attr
(
hdc
)))
return
SP_ERROR
;
proc
=
(
ABORTPROC
)(
UINT_PTR
)
dc_attr
->
abort_proc
;
if
(
proc
&&
!
proc
(
hdc
,
0
))
return
0
;
return
NtGdiStartDoc
(
hdc
,
doc
,
NULL
,
0
);
return
NtGdiStartDoc
(
hdc
,
&
info
,
NULL
,
0
);
}
/***********************************************************************
...
...
@@ -2176,6 +2189,8 @@ INT WINAPI StartDocA( HDC hdc, const DOCINFOA *doc )
DOCINFOW
docW
;
INT
ret
,
len
;
if
(
!
doc
)
return
StartDocW
(
hdc
,
NULL
);
docW
.
cbSize
=
doc
->
cbSize
;
if
(
doc
->
lpszDocName
)
{
...
...
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