linux-stable/include/linux/netfilter/ipset/ip_set_list.h
Jozsef Kadlecsik 1b05756c48 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>
2014-08-24 19:33:10 +02:00

11 lines
236 B
C

#ifndef __IP_SET_LIST_H
#define __IP_SET_LIST_H
#include <uapi/linux/netfilter/ipset/ip_set_list.h>
#define IP_SET_LIST_DEFAULT_SIZE 8
#define IP_SET_LIST_MIN_SIZE 4
#define IP_SET_LIST_MAX_SIZE 65536
#endif /* __IP_SET_LIST_H */