Merge pull request #34 from real-dam/init-intf_addr
authorJoseph C. Lehner <jclehner@users.noreply.github.com>
Mon, 11 May 2020 14:18:13 +0000 (16:18 +0200)
committerGitHub <noreply@github.com>
Mon, 11 May 2020 14:18:13 +0000 (16:18 +0200)
avoid possible use of uninitialized intf_addr in nmrp_do()

nmrp.c

diff --git a/nmrp.c b/nmrp.c
index 4f262d9b6b7ff36c06c95ec4d49251d3e3ce436b..079271a879e010b499b4b977dc269d261ef16667 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -360,7 +360,7 @@ int nmrp_do(struct nmrpd_args *args)
        struct ethsock *sock;
        struct ethsock_ip_undo *ip_undo = NULL;
        struct ethsock_arp_undo *arp_undo = NULL;
-       uint32_t intf_addr;
+       uint32_t intf_addr = 0;
        void (*sigh_orig)(int);
        struct in_addr ipaddr;
        struct in_addr ipmask;