]> granicus.if.org Git - ipset/commit
netfilter: ipset: off by one in ip_set_nfnl_get_byindex()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 21 Oct 2014 16:18:14 +0000 (18:18 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 21 Oct 2014 16:18:14 +0000 (18:18 +0200)
commit149294b1ab29cfa607239a63ea20f0be2351bdd4
tree64e0d2e232c9fac6550519369e55c87bc90f53ad
parentbd19581a64c69eeda11d030993720b7201768658
netfilter: ipset: off by one in ip_set_nfnl_get_byindex()

The ->ip_set_list[] array is initialized in ip_set_net_init() and it
has ->ip_set_max elements so this check should be >= instead of >
otherwise we are off by one.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_core.c