From ea5808dff5a36f5950ad9da4b177b8ba86d0506e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 30 Nov 2014 13:50:04 +0100 Subject: [PATCH] server: Initialize the _len parts to 0 (Coverity). --- server/object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/object.c b/server/object.c index ec196c1bff5..d4afefd9222 100644 --- a/server/object.c +++ b/server/object.c @@ -451,6 +451,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri owner = token_get_user( token ); new_sd.owner_len = security_sid_len( owner ); } + else new_sd.owner_len = 0; if (set_info & GROUP_SECURITY_INFORMATION && sd->group_len) { @@ -467,6 +468,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri group = token_get_primary_group( token ); new_sd.group_len = security_sid_len( group ); } + else new_sd.group_len = 0; new_sd.control |= SE_SACL_PRESENT; sacl = sd_get_sacl( sd, &present ); @@ -479,9 +481,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri if (obj->sd && present) new_sd.sacl_len = obj->sd->sacl_len; else - { new_sd.sacl_len = 0; - } } new_sd.control |= SE_DACL_PRESENT; @@ -499,6 +499,7 @@ int set_sd_defaults_from_token( struct object *obj, const struct security_descri dacl = token_get_default_dacl( token ); new_sd.dacl_len = dacl->AclSize; } + else new_sd.dacl_len = 0; } ptr = mem_alloc( sizeof(new_sd) + new_sd.owner_len + new_sd.group_len +