From: Joseph Sutton Date: Mon, 30 Oct 2023 23:16:15 +0000 (+1300) Subject: s3:utils: Initialize flags (CID 1499396) X-Git-Tag: talloc-2.4.2~876 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4db4df284d5e1d5300b9cd1597581c110cca3807;p=thirdparty%2Fsamba.git s3:utils: Initialize flags (CID 1499396) If ‘got_bcast’ is false and ‘give_flags’ is true, this variable will be used uninitialized. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 005daaba0d4..9523f71a6bc 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -164,7 +164,7 @@ static bool do_node_status(const char *name, static bool query_one(const char *lookup, unsigned int lookup_type) { size_t j, count = 0; - uint8_t flags; + uint8_t flags = 0; struct sockaddr_storage *ip_list=NULL; NTSTATUS status = NT_STATUS_NOT_FOUND;