From: David Lamparter Date: Fri, 25 Aug 2017 23:27:22 +0000 (+0200) Subject: bgpd: encap: fix extension sizing X-Git-Tag: frr-4.0-dev~373^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8c9cc7bbf657e3440d9bc758fe45aef5f43c989f;p=matthieu%2Ffrr.git 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 --- 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