1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-25 19:33:18 +03:00

s3:rpc_server: Initialize array

"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source3/rpc_server/svcctl/srv_svcctl_nt.c:163: var_decl: Declaring variable ""ace"" without initializer.
samba-4.20.0rc2/source3/rpc_server/svcctl/srv_svcctl_nt.c:182: uninit_use_in_call: Using uninitialized value ""*ace"". Field ""ace->object"" is uninitialized when calling ""make_sec_acl"".
  180|   	/* create the security descriptor */
  181|
  182|-> 	if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
  183|   		return NULL;
  184|"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul  8 08:37:46 UTC 2024 on atb-devel-224
This commit is contained in:
Andreas Schneider
2024-07-02 11:41:41 +02:00
committed by Andreas Schneider
parent 742e5b48ae
commit 26c56ae51e

View File

@@ -160,7 +160,7 @@ static NTSTATUS svcctl_access_check( struct security_descriptor *sec_desc, struc
static struct security_descriptor* construct_scm_sd( TALLOC_CTX *ctx )
{
struct security_ace ace[2];
struct security_ace ace[2] = {};
size_t i = 0;
struct security_descriptor *sd;
struct security_acl *theacl;