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
4536a9d6
Commit
4536a9d6
authored
Aug 03, 2007
by
Nigel Liang
Committed by
Alexandre Julliard
Aug 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Fix crash caused by calling set_reg_key with NULL value.
parent
402b8f0d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
winecfg.c
programs/winecfg/winecfg.c
+6
-2
No files found.
programs/winecfg/winecfg.c
View file @
4536a9d6
...
@@ -464,15 +464,19 @@ static void set_reg_key_ex(HKEY root, const WCHAR *path, const WCHAR *name, cons
...
@@ -464,15 +464,19 @@ static void set_reg_key_ex(HKEY root, const WCHAR *path, const WCHAR *name, cons
void
set_reg_key
(
HKEY
root
,
const
char
*
path
,
const
char
*
name
,
const
char
*
value
)
void
set_reg_key
(
HKEY
root
,
const
char
*
path
,
const
char
*
name
,
const
char
*
value
)
{
{
WCHAR
*
wpath
,
*
wname
,
*
wvalue
;
WCHAR
*
wpath
,
*
wname
,
*
wvalue
=
NULL
;
wpath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
wpath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
wname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
wname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
wvalue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
value
)
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
wpath
,
strlen
(
path
)
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
wpath
,
strlen
(
path
)
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
wname
,
strlen
(
name
)
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
wname
,
strlen
(
name
)
+
1
);
if
(
value
)
{
wvalue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
value
)
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
value
,
-
1
,
wvalue
,
strlen
(
value
)
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
value
,
-
1
,
wvalue
,
strlen
(
value
)
+
1
);
}
set_reg_key_ex
(
root
,
wpath
,
wname
,
wvalue
,
REG_SZ
);
set_reg_key_ex
(
root
,
wpath
,
wname
,
wvalue
,
REG_SZ
);
...
...
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