s3:utils: Initialize flags (CID 1499396)
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 30 Oct 2023 23:16:15 +0000 (12:16 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 2 Nov 2023 03:08:37 +0000 (03:08 +0000)
If ‘got_bcast’ is false and ‘give_flags’ is true, this variable will be
used uninitialized.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/nmblookup.c

index 005daaba0d4017b5028932025bc5074dc6fe4776..9523f71a6bce60c89306e59fa0ffbb899b78e00a 100644 (file)
@@ -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;