mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:15:52 +00:00
[WINESYNC] reg: Fail if a system key has a trailing backslash but no subkey path.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 797520db8f7eb708845891da6f08d3030393d6bc by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
f55096783d
commit
f42b63fd64
3 changed files with 18 additions and 8 deletions
|
@ -234,9 +234,6 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path)
|
|||
if (!sane_path(key))
|
||||
return FALSE;
|
||||
|
||||
*path = wcschr(key, '\\');
|
||||
if (*path) (*path)++;
|
||||
|
||||
*root = path_get_rootkey(key);
|
||||
if (!*root)
|
||||
{
|
||||
|
@ -244,6 +241,19 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
*path = wcschr(key, '\\');
|
||||
|
||||
if (!*path)
|
||||
return TRUE;
|
||||
|
||||
(*path)++;
|
||||
|
||||
if (!**path)
|
||||
{
|
||||
output_message(STRING_INVALID_SYSTEM_KEY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue