diff --git a/daemon/socket.c b/daemon/socket.c index 65b1d13f9..afbb0b9a7 100644 --- a/daemon/socket.c +++ b/daemon/socket.c @@ -347,7 +347,7 @@ int endpoint_parse_any(endpoint_t *d, const char *s) { d->port = atoi(ep+1); if (d->port > 0xffff) return -1; - sprintf(buf, "%.*s", len-1, s); + sprintf(buf, "%.*s", len, s); for (i = 0; i < __SF_LAST; i++) { fam = &__socket_families[i];