Skip to contentSkip to conversation

parser_json: fix device parsing in netdev family

PATCH Superseded Pablo Neira Ayuso 1 participant 1 message Aug 1, 2022 netfilter

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 parser_json: fix device parsing in netdev family

json_unpack() function is not designed to take a pre-allocated buffer.

Fixes 3fdc7541fba0 ("src: add multidevice support for netdev chain")
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/parser_json.c +1 -1
index fb401009a499..e136cb2b43b0 100644
@@ -2781,7 +2781,7 @@ static struct cmd *json_parse_cmd_add_chain(struct json_ctx *ctx, json_t *root,
 		.table.location = *int_loc,
 	};
 	const char *family = "", *policy = "", *type, *hookstr;
-	const char name[IFNAMSIZ];
+	const char *name = "";
 	struct chain *chain;
 	int prio;
 
Signature · 1 line
2.30.2