From: Pablo Neira Ayuso Date: Tue, 1 Jul 2014 17:40:31 +0000 (+0200) Subject: proto: initialize result expression in ethertype_parse() X-Git-Tag: v0.4~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=001f8bc05bbf9719b4e6b0eef4993faee28f1480;p=thirdparty%2Fnftables.git 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 --- 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;