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
6fc82343
Commit
6fc82343
authored
Dec 04, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Pad lfFaceName so we don't write uninitialised data to the registry.
Found by Valgrind.
parent
a7326271
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
sysparams.c
dlls/user32/sysparams.c
+13
-3
No files found.
dlls/user32/sysparams.c
View file @
6fc82343
...
...
@@ -699,10 +699,20 @@ static BOOL SYSPARAMS_Save( LPCWSTR lpRegKey, LPCWSTR lpValName, LPCWSTR lpValue
/* Convenience function to save logical fonts */
static
BOOL
SYSPARAMS_SaveLogFont
(
LPCWSTR
lpRegKey
,
LPCWSTR
lpValName
,
LPLOGFONTW
plf
,
UINT
fWinIni
)
const
LPLOGFONTW
plf
,
UINT
fWinIni
)
{
return
SYSPARAMS_SaveRaw
(
lpRegKey
,
lpValName
,
(
const
BYTE
*
)
plf
,
sizeof
(
LOGFONTW
),
REG_BINARY
,
fWinIni
);
LOGFONTW
lf
=
*
plf
;
int
len
;
/* Zero pad the end of lfFaceName so we don't write uninitialised
data to the registry */
lf
.
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
len
=
strlenW
(
lf
.
lfFaceName
);
if
(
len
<
LF_FACESIZE
-
1
)
memset
(
lf
.
lfFaceName
+
len
,
0
,
(
LF_FACESIZE
-
1
-
len
)
*
sizeof
(
WCHAR
));
return
SYSPARAMS_SaveRaw
(
lpRegKey
,
lpValName
,
(
const
BYTE
*
)
&
lf
,
sizeof
(
LOGFONTW
),
REG_BINARY
,
fWinIni
);
}
...
...
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