diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-04 11:17:09 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-04 11:17:09 +0100 |
commit | 3a4e51894442b7fdde457836c6f99d710e47b3f1 (patch) | |
tree | 6da5910686ded1c1f6d13423122ab6d60da39911 /src/util/service.c | |
parent | 31cc8a750f8df10f0a69a8ba9db08a15efa2f415 (diff) |
fix #5454
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/service.c b/src/util/service.c index 20cc1036d..ea34abc6c 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -1175,8 +1175,9 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) const char *nfds; unsigned int cnt; int flags; + char dummy[2]; #endif - + if (GNUNET_CONFIGURATION_have_value (sh->cfg, sh->service_name, @@ -1203,8 +1204,9 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) errno = 0; if ( (NULL != (nfds = getenv ("LISTEN_FDS"))) && (1 == SSCANF (nfds, - "%u", - &cnt)) && + "%u%1s", + &cnt, + dummy)) && (cnt > 0) && (cnt < FD_SETSIZE) && (cnt + 4 < FD_SETSIZE) ) |