From f7f712341fba7bd0715116f78bc0dd5745554ae7 Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Thu, 11 Jan 2024 20:50:09 +0100 Subject: [PATCH] check accept actually succeeded --- ChangeLog | 8 +++++++- sslh-fork.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a68b23f..0daeb47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ -v1.23.0: + +v1.23.x: Obsolete. Please use v2.0 or above. This is a branch where no new features will be introduced, only bugfixes to versions below 1.22. +v1.23.1: + Check accept() for failure in sslh-fork. Aborted + connections otherwise result in crashes. + +v1.23.0: Reintroduce --ssl as alias to --tls. diff --git a/sslh-fork.c b/sslh-fork.c index 128c144..751c0fb 100644 --- a/sslh-fork.c +++ b/sslh-fork.c @@ -179,6 +179,7 @@ void tcp_listener(struct listen_endpoint* endpoint, int num_endpoints, int activ while (1) { in_socket = accept(endpoint[active_endpoint].socketfd, 0, 0); + if (in_socket == -1) continue; if (cfg.verbose) fprintf(stderr, "accepted fd %d\n", in_socket); switch(fork()) {