diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-14 21:33:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-14 21:33:18 +0000 |
commit | b743a6e58d71e5ba84704c047b5fd695390cdde6 (patch) | |
tree | 4f4cc593ba38d766077d8b847fbc800eb3480d18 /src/util/service.c | |
parent | 6f884890eb4cfc7d2faa6f57cbc3e773b722898e (diff) | |
download | gnunet-b743a6e58d71e5ba84704c047b5fd695390cdde6.tar.gz gnunet-b743a6e58d71e5ba84704c047b5fd695390cdde6.zip |
check
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/service.c b/src/util/service.c index 99a364f15..21841dd49 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1143,7 +1143,9 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
1143 | (getpid () == (pid_t) pid) && | 1143 | (getpid () == (pid_t) pid) && |
1144 | (NULL != (nfds = getenv ("LISTEN_FDS"))) && | 1144 | (NULL != (nfds = getenv ("LISTEN_FDS"))) && |
1145 | (1 == sscanf (nfds, "%u", &cnt)) && | 1145 | (1 == sscanf (nfds, "%u", &cnt)) && |
1146 | (cnt > 0) ) | 1146 | (cnt > 0) && |
1147 | (cnt < FD_SETSIZE) && | ||
1148 | (cnt + 4 < FD_SETSIZE) ) | ||
1147 | { | 1149 | { |
1148 | sctx->lsocks = GNUNET_malloc (sizeof(struct GNUNET_NETWORK_Handle*) * (cnt+1)); | 1150 | sctx->lsocks = GNUNET_malloc (sizeof(struct GNUNET_NETWORK_Handle*) * (cnt+1)); |
1149 | while (0 < cnt--) | 1151 | while (0 < cnt--) |