summaryrefslogtreecommitdiff
path: root/include/linux/igmp.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2021-08-05 00:18:50 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-05 13:46:42 +0300
commite6a1f7e0b0fe5997b896b793c70d12fc5ed06cdd (patch)
treeb58331b1accec36c626b5a27d17a796a7021ac3c /include/linux/igmp.h
parentdb243b796439c0caba47865564d8acd18a301d18 (diff)
downloadlinux-e6a1f7e0b0fe5997b896b793c70d12fc5ed06cdd.tar.xz
net/ipv4/igmp: Use struct_size() helper
Replace IP_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>
Diffstat (limited to 'include/linux/igmp.h')
-rw-r--r--include/linux/igmp.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index 64ce8cd1cfaf..93c262ecbdc9 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -41,9 +41,6 @@ struct ip_sf_socklist {
__be32 sl_addr[];
};
-#define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \
- (count) * sizeof(__be32))
-
#define IP_SFBLOCK 10 /* allocate this many at once */
/* ip_mc_socklist is real list now. Speed is not argument;