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: Zebediah Figura z.figura12@gmail.com --- server/registry.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/server/registry.c b/server/registry.c index f36760e6cc1..b7971770728 100644 --- a/server/registry.c +++ b/server/registry.c @@ -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;