]> git.ipfire.org Git - thirdparty/iptables.git/commit
ip{, 6}tables-restore: Fix for uninitialized array 'curtable'
authorPhil Sutter <phil@nwl.cc>
Wed, 19 Sep 2018 13:16:46 +0000 (15:16 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 24 Sep 2018 09:23:52 +0000 (11:23 +0200)
commit4e499d53d558bed55c8fe74390250dbfd6da3efc
tree2627cdf09cb34ad7319fb70f75688d24fa33d656
parent1788f545aae285fa3cd6595d5d25b2ae1b215282
ip{, 6}tables-restore: Fix for uninitialized array 'curtable'

When reading sufficiently malformed input, parser might hit end of
loop without having written the current table name into curtable and
therefore calling strcmp() with uninitialized buffer. Avoid this by
setting curtable to zero upon declaration.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/ip6tables-restore.c
iptables/iptables-restore.c