diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-02-02 01:07:37 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-02-02 01:07:37 -0500 |
commit | ba290f181fa5e3c62346b9b321edd15ebea377c5 (patch) | |
tree | 0e5414116aa987d3c63edfe8ed3cf030f516a9ae /src/network.c | |
parent | b0439d8fa89f0037bd4de59b3cf461bf1396e28b (diff) | |
download | lighttpd-git-ba290f181fa5e3c62346b9b321edd15ebea377c5.tar.gz |
[core] quiet coverity warning
add arbitrary limit of 4096 fds to accept via systemd socket activation
(through environment variables)
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network.c b/src/network.c index 6b65d93e..28a9dbc4 100644 --- a/src/network.c +++ b/src/network.c @@ -529,7 +529,7 @@ static int network_socket_activation_from_env(server *srv, network_socket_config char *listen_fds = getenv("LISTEN_FDS"); pid_t lpid = listen_pid ? (pid_t)strtoul(listen_pid,NULL,10) : 0; int nfds = listen_fds ? atoi(listen_fds) : 0; - int rc = (lpid == getpid() && nfds > 0) + int rc = (lpid == getpid() && nfds > 0 && nfds < 5000) ? network_socket_activation_nfds(srv, s, nfds) : 0; unsetenv("LISTEN_PID"); |