]> git.ipfire.org Git - thirdparty/nftables.git/commit
rule: Avoid segfault with anonymous chains
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 17 Mar 2022 20:53:25 +0000 (21:53 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 17 Mar 2022 20:53:45 +0000 (21:53 +0100)
commit4cf97abfee61209774151e051c93042d8bfab5ee
treecb1d235ca8d8754f3e0c7463e8878ea768da487f
parent4e718641397c876315a87db441afc53139863122
rule: Avoid segfault with anonymous chains

Phil Sutter says:

"When trying to add a rule which contains an anonymous chain to a
non-existent chain, string_misspell_update() is called with a NULL
string because the anonymous chain has no name. Avoid this by making the
function NULL-pointer tolerant."

Fixes: c330152b7f777 ("src: support for implicit chain bindings")
Reported-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/rule.c