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

s4:torture: Initialize struct wrepl_wins_name

"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:1244: var_decl: Declaring variable ""wins_name1"" without initializer.
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:4835: assign: Assigning: ""wins_name_r1"" = ""&wins_name1"", which points to uninitialized data.
samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:4905: uninit_use_in_call: Using uninitialized value ""*wins_name_r1"". Field ""wins_name_r1->is_group"" is uninitialized when calling ""test_wrepl_update_one"".
 4903|
 4904|   		/* now apply R1 */
 4905|-> 		ret &= test_wrepl_update_one(tctx, ctx, records[i].r1.owner, wins_name_r1);
 4906|   		ret &= test_wrepl_is_applied(tctx, ctx, records[i].r1.owner,
 4907|   					     wins_name_r1, records[i].r1.apply_expected);"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 28 12:44:31 UTC 2024 on atb-devel-224
This commit is contained in:
Andreas Schneider 2024-06-24 15:19:20 +02:00 committed by Andreas Schneider
parent 909506c91c
commit a77cffaa25

View File

@ -1241,8 +1241,12 @@ static bool test_conflict_different_owner(struct torture_context *tctx,
struct test_wrepl_conflict_conn *ctx) struct test_wrepl_conflict_conn *ctx)
{ {
bool ret = true; bool ret = true;
struct wrepl_wins_name wins_name1; struct wrepl_wins_name wins_name1 = {
struct wrepl_wins_name wins_name2; .flags = 0,
};
struct wrepl_wins_name wins_name2 = {
.flags = 0,
};
struct wrepl_wins_name *wins_name_r1; struct wrepl_wins_name *wins_name_r1;
struct wrepl_wins_name *wins_name_r2; struct wrepl_wins_name *wins_name_r2;
uint32_t i; uint32_t i;