mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e6a1f7e0b0
commit
e11c0e258c
2 changed files with 13 additions and 10 deletions
|
@ -82,9 +82,6 @@ struct ip6_sf_socklist {
|
|||
struct in6_addr sl_addr[];
|
||||
};
|
||||
|
||||
#define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + \
|
||||
(count) * sizeof(struct in6_addr))
|
||||
|
||||
#define IP6_SFBLOCK 10 /* allocate this many at once */
|
||||
|
||||
struct ipv6_mc_socklist {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue