From a52a117f80330e1ad8c322f8282b1eabeafcf0c6 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 24 Jan 2016 18:50:43 +0100 Subject: [PATCH] server: Add missing check for objattr variable in load_registry wineserver call (Coverity). Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- server/registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/registry.c b/server/registry.c index 5723824ff23..a35765c72f4 100644 --- a/server/registry.c +++ b/server/registry.c @@ -2187,6 +2187,8 @@ DECL_HANDLER(load_registry) const struct security_descriptor *sd; const struct object_attributes *objattr = get_req_object_attributes( &sd, &name ); + if (!objattr) return; + if (!thread_single_check_privilege( current, &SeRestorePrivilege )) { set_error( STATUS_PRIVILEGE_NOT_HELD );