OSDN Git Service

net/ipv6/mcast: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 4 Aug 2021 21:43:52 +0000 (16:43 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 10:46:42 +0000 (11:46 +0100)
commite11c0e258c1a87e478a7a44e7c3d9e8ea4b8438c
tree711ee3c08fa6db66a966da272f1dfa469e12170d
parente6a1f7e0b0fe5997b896b793c70d12fc5ed06cdd
net/ipv6/mcast: Use struct_size() helper

Replace IP6_SFLSIZE() with struct_size() helper in order to avoid any
potential type mistakes or integer overflows that, in the worst
scenario, could lead to heap overflows.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/if_inet6.h
net/ipv6/mcast.c