Commit a8d6211b authored by Peter Feuerer's avatar Peter Feuerer

Initialize address_len before accept()

accept() could produce unexpected behavior in case the address_len is
uninitialized, e.g. return -1 with EINVAL
parent 56fe7bed
......@@ -683,7 +683,7 @@ static void event_incoming (struct bufferevent *bev, short what, void *_arg) {
static void accept_incoming (evutil_socket_t efd, short what, void *arg) {
vlogprintf (E_WARNING, "Accepting incoming connection\n");
unsigned clilen;
unsigned clilen = 0;
struct sockaddr_in cli_addr;
int fd = accept (efd, (struct sockaddr *)&cli_addr, &clilen);
......
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