diff --git a/sslh-conf.c b/sslh-conf.c index db0c338..0548db5 100644 --- a/sslh-conf.c +++ b/sslh-conf.c @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sun Feb 21 20:56:51 2021. + * on Tue Mar 16 20:23:24 2021. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2019 Yves Rutschle diff --git a/sslh-conf.h b/sslh-conf.h index 9295c2a..721db63 100644 --- a/sslh-conf.h +++ b/sslh-conf.h @@ -1,5 +1,5 @@ /* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README) - * on Sun Feb 21 20:56:51 2021. + * on Tue Mar 16 20:23:24 2021. # conf2struct: generate libconf parsers that read to structs # Copyright (C) 2018-2019 Yves Rutschle diff --git a/sslh-select.c b/sslh-select.c index df6b099..43a05ed 100644 --- a/sslh-select.c +++ b/sslh-select.c @@ -76,8 +76,8 @@ static int extend_collection(struct cnx_collection* collection) int i, new_length = collection->num_cnx + cnx_num_alloc; if (cfg.verbose) - fprintf(stderr, "allocating %ld more slots.\n", cnx_num_alloc); - new = realloc(&collection->cnx, new_length * sizeof(collection->cnx[0])); + fprintf(stderr, "allocating %ld more slots (target: %d).\n", cnx_num_alloc, new_length); + new = realloc(collection->cnx, new_length * sizeof(collection->cnx[0])); if (!new) return -1; collection->cnx = new; @@ -165,7 +165,7 @@ static int accept_new_connection(int listen_socket, struct cnx_collection *colle } if (free >= collection->num_cnx) { res = extend_collection(collection); - if (!res) { + if (res) { log_message(LOG_ERR, "unable to extend collection -- dropping connection\n"); close(in_socket); return -1; diff --git a/t b/t index 45179c3..5560121 100755 --- a/t +++ b/t @@ -21,7 +21,7 @@ my $sslh_port = $conf->fetch_array("listen")->[0]->{port}; my $user = (getpwuid $<)[0]; # Run under current username # Which tests do we run -my $SSH_SHY_CNX = 1; +my $SSH_SHY_CNX = 0; my $PROBES_NOFRAG = 1; my $PROBES_AGAIN = 1; my $SSL_MIX_SSH = 1; @@ -31,12 +31,12 @@ my $SSH_MIX_SSL = 1; # coverage, but do not necessarily result in an actual test # (e.g. some tests need to be run with valgrind to check all # memory management code). -my $RB_CNX_NOSERVER = 1; -my $RB_PARAM_NOHOST = 1; -my $RB_WRONG_USERNAME = 1; -my $RB_OPEN_PID_FILE = 1; -my $RB_RESOLVE_ADDRESS = 1; -my $RB_CL_PARAMS = 1; +my $RB_CNX_NOSERVER = 0; +my $RB_PARAM_NOHOST = 0; +my $RB_WRONG_USERNAME = 0; +my $RB_OPEN_PID_FILE = 0; +my $RB_RESOLVE_ADDRESS = 0; +my $RB_CL_PARAMS = 0; `lcov --directory . --zerocounters`; @@ -208,7 +208,8 @@ foreach my $s (@{$conf->fetch_array("protocols")}) { } -my @binaries = ('sslh-select', 'sslh-fork'); +#my @binaries = ('sslh-select', 'sslh-fork'); +my @binaries = ('sslh-select'); for my $binary (@binaries) { warn "Testing $binary\n";