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
88a4b618
Commit
88a4b618
authored
Mar 11, 2011
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Protect from closing the root key.
parent
4edff21e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
winecfg.c
programs/winecfg/winecfg.c
+4
-4
No files found.
programs/winecfg/winecfg.c
View file @
88a4b618
...
...
@@ -113,7 +113,7 @@ static WCHAR *get_config_key (HKEY root, const WCHAR *subkey, const WCHAR *name,
WINE_TRACE
(
"subkey=%s, name=%s, def=%s
\n
"
,
wine_dbgstr_w
(
subkey
),
wine_dbgstr_w
(
name
),
wine_dbgstr_w
(
def
));
res
=
RegOpenKey
W
(
root
,
subkey
,
&
hSubKey
);
res
=
RegOpenKey
ExW
(
root
,
subkey
,
0
,
MAXIMUM_ALLOWED
,
&
hSubKey
);
if
(
res
!=
ERROR_SUCCESS
)
{
if
(
res
==
ERROR_FILE_NOT_FOUND
)
...
...
@@ -146,7 +146,7 @@ static WCHAR *get_config_key (HKEY root, const WCHAR *subkey, const WCHAR *name,
WINE_TRACE
(
"buffer=%s
\n
"
,
wine_dbgstr_w
(
buffer
));
end:
if
(
hSubKey
&&
hSubKey
!=
root
)
RegCloseKey
(
hSubKey
);
RegCloseKey
(
hSubKey
);
return
buffer
;
}
...
...
@@ -471,7 +471,7 @@ static WCHAR **enumerate_valuesW(HKEY root, WCHAR *path)
WCHAR
**
values
=
NULL
;
struct
list
*
cursor
;
res
=
RegOpenKey
W
(
root
,
path
,
&
key
);
res
=
RegOpenKey
ExW
(
root
,
path
,
0
,
MAXIMUM_ALLOWED
,
&
key
);
if
(
res
==
ERROR_SUCCESS
)
{
while
(
TRUE
)
...
...
@@ -641,7 +641,7 @@ static void process_setting(struct setting *s)
else
{
WINE_TRACE
(
"Removing %s:%s
\n
"
,
wine_dbgstr_w
(
s
->
path
),
wine_dbgstr_w
(
s
->
name
));
if
(
!
RegOpenKey
W
(
s
->
root
,
s
->
path
,
&
key
))
if
(
!
RegOpenKey
ExW
(
s
->
root
,
s
->
path
,
0
,
MAXIMUM_ALLOWED
,
&
key
))
{
/* NULL name means remove that path/section entirely */
if
(
s
->
name
)
RegDeleteValueW
(
key
,
s
->
name
);
...
...
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