From 1f8d92d3ec3d68e72211301f344bda5628cc15ce Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 Feb 2015 21:14:24 -0800 Subject: [PATCH] sockaddr_un needs the null terminator included in the address length --- src/core/iomgr/resolve_address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/resolve_address.c b/src/core/iomgr/resolve_address.c index 6d748c86981..ce9b157e31a 100644 --- a/src/core/iomgr/resolve_address.c +++ b/src/core/iomgr/resolve_address.c @@ -134,7 +134,7 @@ grpc_resolved_addresses *grpc_blocking_resolve_address( un = (struct sockaddr_un *)addrs->addrs->addr; un->sun_family = AF_UNIX; strcpy(un->sun_path, name + 5); - addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family); + addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; return addrs; }