Commit dfc7a6c6 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Fixes potential alignment bug in BGP.

Thanks to Andrew (seti.kr.ua) for the bug report.
parent 523f020b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment