summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-02-21 12:24:30 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-02-21 12:24:30 +0100
commitdfc7a6c6a0758a1d9a13b94708228c9844efe97e (patch)
tree09ed90a3e1d535f0275002f5f518d0dcccd7ea2e /proto/bgp/attrs.c
parent523f020b5f6b63096a7d5e90938baecd4beea0bd (diff)
Fixes potential alignment bug in BGP.
Thanks to Andrew (seti.kr.ua) for the bug report.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index a091ed1e..72b45d47 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -717,7 +717,7 @@ bgp_new_bucket(struct bgp_proto *p, ea_list *new, unsigned hash)
struct bgp_bucket *b;
unsigned ea_size = sizeof(ea_list) + new->count * sizeof(eattr);
unsigned ea_size_aligned = BIRD_ALIGN(ea_size, CPU_STRUCT_ALIGN);
- unsigned size = sizeof(struct bgp_bucket) + ea_size;
+ unsigned size = sizeof(struct bgp_bucket) + ea_size_aligned;
unsigned i;
byte *dest;
unsigned index = hash & (p->hash_size - 1);