]> git.ipfire.org Git - thirdparty/nftables.git/commit
netlink_delinearize: Avoid potential null pointer deref
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Sep 2016 16:52:43 +0000 (18:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Sep 2016 09:12:46 +0000 (11:12 +0200)
commitd975ab412c33ddce2c39e0e86f87085d13b1aeca
treef3c00eec6fc0020940bef78185aa12733ca8130b
parent8087280d76c31c851c85bd1d920ba92bb642ad9f
netlink_delinearize: Avoid potential null pointer deref

Phil Sutter says:

As netlink_get_register() may return NULL, we must not pass the returned
data unchecked to expr_set_type() as that will dereference it. Since the
parser has failed at that point anyway, by returning early we can skip
the useless statement allocation that follows in
netlink_parse_ct_stmt().

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
src/netlink_delinearize.c