mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
nd6: Fix the array size in union nd_opts
ND_OPT_ROUTE_INFO is 24, so an access of that index is technically out of bounds, though note that the per-option struct has an entry for this option. Fix the array size to appease -fsanitize=array-bounds. Reviewed by: pouria, glebius MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59392
This commit is contained in:
1 parent
464b29857f
commit
fc33bbb024
1 file changed
+1
-1
+1
-1
@@ -288,7 +288,7 @@ VNET_DECLARE(int, ip6_temp_regen_advance); /* seconds */
|
||||
#define V_ip6_temp_regen_advance VNET(ip6_temp_regen_advance)
|
||||
|
||||
union nd_opts {
|
||||
struct nd_opt_hdr *nd_opt_array[24]; /* max = ND_OPT_ROUTE_INFO */
|
||||
struct nd_opt_hdr *nd_opt_array[25]; /* max = ND_OPT_ROUTE_INFO */
|
||||
struct {
|
||||
struct nd_opt_hdr *zero;
|
||||
struct nd_opt_hdr *src_lladdr;
|
||||
|
||||
Reference in new issue
Block a user