summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2016-08-12 01:33:39 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-12 01:56:53 +0200
commit6257aaf53ede6456e28b0224d215c811f534ff35 (patch)
tree63589d00f3275fc5149e1a412941928536915f82 /src
parent7a150cacc1754f66525f0e87b14b35fbc2a6338e (diff)
ruleset: Initialize ctx.flags before calling nftnl_ruleset_ctx_set()
The called function otherwise accesses uninitialized data. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/ruleset.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ruleset.c b/src/ruleset.c
index 666bcc7..2f3c110 100644
--- a/src/ruleset.c
+++ b/src/ruleset.c
@@ -551,6 +551,7 @@ static int nftnl_ruleset_json_parse(const void *json,
ctx.cb = cb;
ctx.format = type;
+ ctx.flags = 0;
ctx.set_list = nftnl_set_list_alloc();
if (ctx.set_list == NULL)
@@ -682,6 +683,7 @@ static int nftnl_ruleset_xml_parse(const void *xml, struct nftnl_parse_err *err,
ctx.cb = cb;
ctx.format = type;
+ ctx.flags = 0;
ctx.set_list = nftnl_set_list_alloc();
if (ctx.set_list == NULL)