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

s4:torture: Initialize struct wrepl_wins_name

"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:6759: var_decl: Declaring variable ""wins_name_"" without initializer.
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:6760: assign: Assigning: ""wins_name"" = ""&wins_name_"", which points to uninitialized data.
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:9455: uninit_use_in_call: Using uninitialized value ""*wins_name"". Field ""wins_name->is_group"" is uninitialized when calling ""test_wrepl_update_one"".
 9453|   		wins_name->unknown	= ""255.255.255.255"";
 9454|
 9455|-> 		ret &= test_wrepl_update_one(tctx, ctx, &ctx->b, wins_name);
 9456|
 9457|   		/*"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Andreas Schneider 2024-06-24 12:22:19 +02:00 committed by Andreas Schneider
parent ec7dfedccf
commit 7990a2ba08

View File

@ -6758,7 +6758,9 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
{ {
bool ret = true; bool ret = true;
NTSTATUS status; NTSTATUS status;
struct wrepl_wins_name wins_name_; struct wrepl_wins_name wins_name_ = {
.flags = 0,
};
struct wrepl_wins_name *wins_name = &wins_name_; struct wrepl_wins_name *wins_name = &wins_name_;
struct nbt_name_register name_register_; struct nbt_name_register name_register_;
struct nbt_name_register *name_register = &name_register_; struct nbt_name_register *name_register = &name_register_;