summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-08-05 22:02:34 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-08-05 22:02:34 +0200
commited28cbc93d124421d2810797d4b6d98f8ab07aae (patch)
tree4c6d23ddaa78ba96e69d60d4e6750d34d48569e1 /kernel/include/linux
parentcc63c93eb9e27786559bea642edfef91cca831fd (diff)
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.
Diffstat (limited to 'kernel/include/linux')
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_list.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_list.h b/kernel/include/linux/netfilter/ipset/ip_set_list.h
index 68c2aea..fe2622a 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_list.h
+++ b/kernel/include/linux/netfilter/ipset/ip_set_list.h
@@ -6,5 +6,6 @@
#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 */