From 2220a3ac8d45faa695eb96b83732b9327b6fd2c2 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 1 Jun 2015 11:49:12 -0400 Subject: [PATCH] fix parsing of IP:port endpoints --- daemon/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];