mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s4:torture: Initialize struct nbt_name_query
"Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/nbt/query.c:53: var_decl: Declaring variable ""io"" without initializer. samba-4.20.0rc2/source4/torture/nbt/query.c:76: uninit_use_in_call: Using uninitialized value ""io.in.retries"" when calling ""nbt_name_query_send"". 74| while (num_sent - (result->num_pass+result->num_fail) < 10) { 75| struct nbt_name_request *req; 76|-> req = nbt_name_query_send(nbtsock, &io); 77| torture_assert(tctx, req != NULL, ""Failed to setup request!""); 78| req->async.fn = increment_handler;" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
parent
deced5eaae
commit
4777464946
@ -50,7 +50,11 @@ static bool bench_namequery(struct torture_context *tctx)
|
|||||||
struct nbt_name_socket *nbtsock = torture_init_nbt_socket(tctx);
|
struct nbt_name_socket *nbtsock = torture_init_nbt_socket(tctx);
|
||||||
int num_sent=0;
|
int num_sent=0;
|
||||||
struct result_struct *result;
|
struct result_struct *result;
|
||||||
struct nbt_name_query io;
|
struct nbt_name_query io = {
|
||||||
|
.in = {
|
||||||
|
.retries = 0,
|
||||||
|
}
|
||||||
|
};
|
||||||
struct timeval tv = timeval_current();
|
struct timeval tv = timeval_current();
|
||||||
int timelimit = torture_setting_int(tctx, "timelimit", 5);
|
int timelimit = torture_setting_int(tctx, "timelimit", 5);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user