mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
s3:registry: Initialize struct security_ace ace[]
Error: UNINIT (CWE-457): samba-4.20.0rc2/source3/registry/reg_dispatcher.c:43: var_decl: Declaring variable "ace" without initializer. samba-4.20.0rc2/source3/registry/reg_dispatcher.c:66: uninit_use_in_call: Using uninitialized value "*ace". Field "ace->object" is uninitialized when calling "make_sec_acl". 64| /* create the security descriptor */ 65| 66|-> theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace); 67| if (theacl == NULL) { 68| return WERR_NOT_ENOUGH_MEMORY; Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
275ffbf560
commit
fd4afa309e
@ -40,7 +40,7 @@ static const struct generic_mapping reg_generic_map =
|
||||
|
||||
static WERROR construct_registry_sd(TALLOC_CTX *ctx, struct security_descriptor **psd)
|
||||
{
|
||||
struct security_ace ace[3];
|
||||
struct security_ace ace[3] = {};
|
||||
size_t i = 0;
|
||||
struct security_descriptor *sd;
|
||||
struct security_acl *theacl;
|
||||
|
Loading…
Reference in New Issue
Block a user