From cd1f3817def48e94fbb6cff073d5bbbd52594967 Mon Sep 17 00:00:00 2001 From: iedowse Date: Thu, 26 Apr 2001 17:24:05 +0000 Subject: The function __rpc_uaddr2taddr_af() converts an RPC "universal address" string to a netbuf/sockaddr "transport address". In the case of an AF_LOCAL address, it was missing the code to actually point the netbuf at the newly allocated sockaddr_un, so the caller ended up with a netbuf containing junk. Submitted by: Martin Blapp --- lib/libc/rpc/rpc_generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c index 7b00d2c..81f0b6d 100644 --- a/lib/libc/rpc/rpc_generic.c +++ b/lib/libc/rpc/rpc_generic.c @@ -710,6 +710,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) memset(sun, 0, sizeof *sun); sun->sun_family = AF_LOCAL; strncpy(sun->sun_path, addrstr, sizeof(sun->sun_path) - 1); + ret->len = ret->maxlen = sun->sun_len = SUN_LEN(sun); + ret->buf = sun; break; default: break; -- cgit v1.1