X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/3abd18e85781e00e2b7fc641f29c99e130238abf..9c8b814617dfc7676c8e7e2772896a8cf23306fb:/udp.c diff --git a/udp.c b/udp.c index 42fbb1f..97b92a6 100644 --- a/udp.c +++ b/udp.c @@ -19,6 +19,7 @@ #include #include #include "util.h" +#include "magic.h" #include "unaligned.h" #include "ipaddr.h" #include "magic.h" @@ -102,6 +103,7 @@ static void udp_afterpoll(void *state, struct pollfd *fds, int nfds) fromlen=sizeof(from); BUF_ASSERT_FREE(st->rbuf); BUF_ALLOC(st->rbuf,"udp_afterpoll"); + buffer_init(st->rbuf,calculate_max_start_pad()); rv=recvfrom(st->fd, st->rbuf->start, st->rbuf->len, 0, (struct sockaddr *)&from, &fromlen); if (rv>0) {