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
eee8131d
Commit
eee8131d
authored
Dec 18, 2017
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Dec 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Fix a crash when inputting non-ASCII dll override name.
Signed-off-by:
Zhiyi Zhang
<
yi.gd.cn@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1ca988d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
winecfg.c
programs/winecfg/winecfg.c
+8
-6
No files found.
programs/winecfg/winecfg.c
View file @
eee8131d
...
...
@@ -571,7 +571,7 @@ char **enumerate_values(HKEY root, char *path)
WCHAR
*
wpath
;
WCHAR
**
wret
;
char
**
ret
=
NULL
;
int
i
=
0
,
len
=
0
;
int
i
=
0
,
len
=
0
,
size
;
wpath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
wpath
,
strlen
(
path
)
+
1
);
...
...
@@ -586,11 +586,13 @@ char **enumerate_values(HKEY root, char *path)
/* convert WCHAR ** to char ** and HeapFree each WCHAR * element on our way */
for
(
i
=
0
;
i
<
len
;
i
++
)
{
ret
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
wret
[
i
])
+
1
)
*
sizeof
(
char
));
WideCharToMultiByte
(
CP_ACP
,
0
,
wret
[
i
],
-
1
,
ret
[
i
],
lstrlenW
(
wret
[
i
])
+
1
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
wret
[
i
]);
size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
wret
[
i
],
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
size
)
{
ret
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wret
[
i
],
-
1
,
ret
[
i
],
size
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
wret
[
i
]);
}
}
ret
[
len
]
=
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