1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:torture: Initialize struct netr_IdentityInfo

"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/rpc/samr.c:3601: var_decl: Declaring variable ""identity"" without initializer.
samba-4.20.0rc2/source4/torture/rpc/samr.c:3650: uninit_use: Using uninitialized value ""identity"". Field ""identity.domain_name.length"" is uninitialized.
 3648|   		}
 3649|
 3650|-> 		pinfo.identity_info = identity;
 3651|   		logon.password = &pinfo;
 3652|"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Andreas Schneider 2024-07-05 13:37:30 +02:00 committed by Günther Deschner
parent a3856ee4dc
commit 3aa6aa02a8

View File

@ -3598,7 +3598,7 @@ static bool test_SamLogon(struct torture_context *tctx,
union netr_LogonLevel logon; union netr_LogonLevel logon;
union netr_Validation validation; union netr_Validation validation;
uint8_t authoritative; uint8_t authoritative;
struct netr_IdentityInfo identity; struct netr_IdentityInfo identity = {};
struct netr_NetworkInfo ninfo; struct netr_NetworkInfo ninfo;
struct netr_PasswordInfo pinfo; struct netr_PasswordInfo pinfo;
DATA_BLOB names_blob, chal, lm_resp, nt_resp; DATA_BLOB names_blob, chal, lm_resp, nt_resp;