From 8c9cc7bbf657e3440d9bc758fe45aef5f43c989f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 26 Aug 2017 01:27:22 +0200 Subject: [PATCH] bgpd: encap: fix extension sizing Variably-sized struct tails are done as [0], not [1]. The latter triggers compiler warnings and mis-sizes "sizeof(struct) + n" expressions. Signed-off-by: David Lamparter --- bgpd/bgp_attr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 324813c085..4dd38459f8 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -72,7 +72,7 @@ struct bgp_attr_encap_subtlv { unsigned long refcnt; uint16_t type; uint16_t length; - uint8_t value[1]; /* will be extended */ + uint8_t value[0]; /* will be extended */ }; #if ENABLE_BGP_VNC -- 2.39.5