Fix wrong size in memset() call.

Thanks to Dave Reisner.
This commit is contained in:
Dave Reisner
2013-04-18 09:47:49 +01:00
committed by Simon Kelley
parent 834f36fe6d
commit 4582c0efe7

View File

@@ -110,7 +110,7 @@ static int new_add_to_ipset(const char *setname, const struct all_addr *ipaddr,
return -1; return -1;
} }
memset(buffer, 0, sizeof(buffer)); memset(buffer, 0, BUFF_SZ);
nlh = (struct nlmsghdr *)buffer; nlh = (struct nlmsghdr *)buffer;
nlh->nlmsg_len = NL_ALIGN(sizeof(struct nlmsghdr)); nlh->nlmsg_len = NL_ALIGN(sizeof(struct nlmsghdr));