From 86f5bdc2a85b208053e7361ccd575e4eb3c853a3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 25 Mar 2022 14:55:53 +0100 Subject: expect/conntrack: Avoid spurious covscan overrun warning It doesn't like how memset() is called for a struct nfnlhdr pointer with large size value. Pass void pointers instead. This also removes the call from __build_{expect,conntrack}() which is duplicate in __build_query_{exp,ct}() code-path. Signed-off-by: Phil Sutter --- src/expect/build.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/expect/build.c') diff --git a/src/expect/build.c b/src/expect/build.c index 2e0f968..1807adc 100644 --- a/src/expect/build.c +++ b/src/expect/build.c @@ -29,8 +29,6 @@ int __build_expect(struct nfnl_subsys_handle *ssh, else return -1; - memset(req, 0, size); - buf = (char *)&req->nlh; nlh = mnl_nlmsg_put_header(buf); nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK_EXP << 8) | type; -- cgit v1.2.3