Skip to content

Commit

Permalink
Initialize buffer used for nlh and nfg
Browse files Browse the repository at this point in the history
(cherry picked from commit b14bd6c)
  • Loading branch information
pbrzezinskiCSP authored and guyharris committed Sep 26, 2019
1 parent 104a7df commit 69f6fea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pcap-netfilter-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 69f6fea

Please sign in to comment.