From 001f8bc05bbf9719b4e6b0eef4993faee28f1480 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 1 Jul 2014 19:40:31 +0200 Subject: proto: initialize result expression in ethertype_parse() Otherwise, you may crash in: nft add rule bridge filter input ether type ip Reported-by: Alvaro Neira Ayuso Signed-off-by: Pablo Neira Ayuso --- src/proto.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/proto.c') diff --git a/src/proto.c b/src/proto.c index 0a37a658..e5f49cb2 100644 --- a/src/proto.c +++ b/src/proto.c @@ -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; -- cgit v1.2.3