Commit 089b2528 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Return STATUS_KEY_DELETED when trying to retrieve the full name of a deleted key.

This fixes a server crash that can be triggered by deleting a key and then trying to retrieve its name. In that case key->parent is NULL. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e759da26
......@@ -413,6 +413,12 @@ static WCHAR *key_get_full_name( struct object *obj, data_size_t *ret_len )
data_size_t len = sizeof(root_name) - sizeof(WCHAR);
char *ret;
if (key->flags & KEY_DELETED)
{
set_error( STATUS_KEY_DELETED );
return NULL;
}
for (key = (struct key *)obj; key != root_key; key = key->parent) len += key->namelen + sizeof(WCHAR);
if (!(ret = malloc( len ))) return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment