]> The Tcpdump Group git mirrors - libpcap/commitdiff
Initialize buffer used for nlh and nfg 849/head
authorPawel Brzezinski <[email protected]>
Wed, 25 Sep 2019 11:21:18 +0000 (13:21 +0200)
committerPawel Brzezinski <[email protected]>
Wed, 25 Sep 2019 19:27:36 +0000 (21:27 +0200)
pcap-netfilter-linux.c

index 39a463d0009a962758e4017a5bed4b70b060fb42..cf0e2560e2e80c9eb1812225fc4c0f396a3a2fa7 100644 (file)
@@ -316,6 +316,7 @@ static int
 netfilter_send_config_msg(const pcap_t *handle, uint16_t msg_type, int ack, u_int8_t family, u_int16_t res_id, const struct my_nfattr *mynfa)
 {
        char buf[1024] __attribute__ ((aligned));
+       memset(buf, 0, sizeof(buf));
 
        struct nlmsghdr *nlh = (struct nlmsghdr *) buf;
        struct nfgenmsg *nfg = (struct nfgenmsg *) (buf + sizeof(struct nlmsghdr));