Commit 984f145f authored by Nils Goroll's avatar Nils Goroll

Align ban lumps

should fix #2050
parent bab71a1a
......@@ -183,7 +183,8 @@ ban_get_lump(const uint8_t **bs)
while (**bs == 0xff)
*bs += 1;
ln = vbe32dec(*bs);
*bs += 4;
*bs += PRNDUP(sizeof(uint32_t));
assert(PAOK(*bs));
r = (const void*)*bs;
*bs += ln;
return (r);
......
......@@ -101,7 +101,7 @@ BAN_Abandon(struct ban_proto *bp)
static void
ban_add_lump(const struct ban_proto *bp, const void *p, uint32_t len)
{
uint8_t buf[sizeof len];
uint8_t buf[PRNDUP(sizeof len)];
buf[0] = 0xff;
while (VSB_len(bp->vsb) & PALGN)
......
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