Commit 345eb517 authored by Nils Goroll's avatar Nils Goroll

Init the buffer so padding bytes for alignment are always the same

Otherwise ban_equal may not work due to undefined contents of buf

Should fix c19.vtc regression from 984f145f
parent 8d0686dc
......@@ -101,9 +101,8 @@ 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[PRNDUP(sizeof len)];
uint8_t buf[PRNDUP(sizeof len)] = { 0xff };
buf[0] = 0xff;
while (VSB_len(bp->vsb) & PALGN)
VSB_putc(bp->vsb, buf[0]);
vbe32enc(buf, len);
......
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