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
32393796
Commit
32393796
authored
Jun 22, 2008
by
Dan Kegel
Committed by
Alexandre Julliard
Jun 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: GdiConvertToDevmodeW should not refer to unintialized name bytes.
parent
97f4fbca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
driver.c
dlls/gdi32/driver.c
+6
-2
No files found.
dlls/gdi32/driver.c
View file @
32393796
...
...
@@ -431,15 +431,19 @@ DEVMODEW * WINAPI GdiConvertToDevmodeW(const DEVMODEA *dmA)
dmW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dmW_size
+
dmA
->
dmDriverExtra
);
if
(
!
dmW
)
return
NULL
;
MultiByteToWideChar
(
CP_ACP
,
0
,
(
const
char
*
)
dmA
->
dmDeviceName
,
CCHDEVICENAME
,
MultiByteToWideChar
(
CP_ACP
,
0
,
(
const
char
*
)
dmA
->
dmDeviceName
,
-
1
,
dmW
->
dmDeviceName
,
CCHDEVICENAME
);
/* copy slightly more, to avoid long computations */
memcpy
(
&
dmW
->
dmSpecVersion
,
&
dmA
->
dmSpecVersion
,
dmA_size
-
CCHDEVICENAME
);
if
(
dmA_size
>=
FIELD_OFFSET
(
DEVMODEA
,
dmFormName
)
+
CCHFORMNAME
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
(
const
char
*
)
dmA
->
dmFormName
,
CCHFORMNAME
,
if
(
dmA
->
dmFields
&
DM_FORMNAME
)
MultiByteToWideChar
(
CP_ACP
,
0
,
(
const
char
*
)
dmA
->
dmFormName
,
-
1
,
dmW
->
dmFormName
,
CCHFORMNAME
);
else
dmW
->
dmFormName
[
0
]
=
0
;
if
(
dmA_size
>
FIELD_OFFSET
(
DEVMODEA
,
dmLogPixels
))
memcpy
(
&
dmW
->
dmLogPixels
,
&
dmA
->
dmLogPixels
,
dmA_size
-
FIELD_OFFSET
(
DEVMODEA
,
dmLogPixels
));
}
...
...
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