netfilter: nft_ct: fix random validation errors for zone set support
authorFlorian Westphal <fw@strlen.de>
Mon, 13 Feb 2017 21:26:49 +0000 (22:26 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 23 Feb 2017 20:50:28 +0000 (21:50 +0100)
Dan reports:
 net/netfilter/nft_ct.c:549 nft_ct_set_init()
 error: uninitialized symbol 'len'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: edee4f1e924582 ("netfilter: nft_ct: add zone id set support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_ct.c

index c6b8022c0e47d43e11a7f2f351f3f0650c9ba604..bf548a7a71ec9b49cf308af041811d2eb5f33c8c 100644 (file)
@@ -528,6 +528,7 @@ static int nft_ct_set_init(const struct nft_ctx *ctx,
                if (!nft_ct_tmpl_alloc_pcpu())
                        return -ENOMEM;
                nft_ct_pcpu_template_refcnt++;
+               len = sizeof(u16);
                break;
 #endif
        default: