--- libaitio/src/Attic/tools.c 2012/05/14 15:08:26 1.11.2.1 +++ libaitio/src/Attic/tools.c 2012/05/14 15:17:26 1.11.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tools.c,v 1.11.2.1 2012/05/14 15:08:26 misho Exp $ +* $Id: tools.c,v 1.11.2.2 2012/05/14 15:17:26 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -516,7 +516,8 @@ io_gethostbyname(const char *psHost, u_short port, io_ case AF_LOCAL: addr->sun.sun_len = sizeof(struct sockaddr_un); addr->sun.sun_family = AF_LOCAL; - strlcpy(addr->sun.sun_path, psHost, sizeof addr->sun.sun_path); + memset(addr->sun.sun_path, 0, sizeof addr->sun.sun_path); + snprintf(addr->sun.sun_path, sizeof addr->sun.sun_path, "%s-%hu", psHost, port); return addr; default: io_SetErr(EPROTONOSUPPORT, "Unsuported address family %d", addr->sa.sa_family);