netfilter: ipset: Fix warn: integer overflows 'sizeof(*map) + size * set->dsize'
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 5 Aug 2014 20:02:34 +0000 (22:02 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 24 Aug 2014 17:33:10 +0000 (19:33 +0200)
commit1b05756c48ea07ced9604ef01d11194d936da163
treedc983e436607c9280f3d2bcea831d61d1e572b1a
parent94729f8a1e9d38c8df6c83799fde8d2eaef2ff54
netfilter: ipset: Fix warn: integer overflows 'sizeof(*map) + size * set->dsize'

Dan Carpenter reported that the static checker emits the warning

        net/netfilter/ipset/ip_set_list_set.c:600 init_list_set()
        warn: integer overflows 'sizeof(*map) + size * set->dsize'

Limit the maximal number of elements in list type of sets.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
include/linux/netfilter/ipset/ip_set_list.h
net/netfilter/ipset/ip_set_list_set.c