Skip to contentSkip to conversation

proto: initialize result expression in ethertype_parse()

PATCH New Pablo Neira Ayuso 1 participant 1 message Jul 1, 2014 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 proto: initialize result expression in ethertype_parse()

Otherwise, you may crash in:

nft add rule bridge filter input ether type ip

---
 src/proto.c |    1 +
 1 file changed, 1 insertion(+)
src/proto.c +1 -0
index 0a37a65..e5f49cb 100644
@@ -754,6 +754,7 @@ static struct error_record *ethertype_parse(const struct expr *sym,
 {
 	struct error_record *erec;
 
+	*res = NULL;
 	erec = sym->dtype->basetype->parse(sym, res);
 	if (erec != NULL)
 		return erec;
Signature · 1 line
1.7.10.4