diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-04-26 17:24:05 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-04-26 17:24:05 +0000 |
commit | cd1f3817def48e94fbb6cff073d5bbbd52594967 (patch) | |
tree | 0eb19a58f49933a0435955e317a678dcfa51773e /lib/libc | |
parent | cd85442a9cb3b77494f52bde72f1c4bca863cba6 (diff) | |
download | FreeBSD-src-cd1f3817def48e94fbb6cff073d5bbbd52594967.zip FreeBSD-src-cd1f3817def48e94fbb6cff073d5bbbd52594967.tar.gz |
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 <mb@imp.ch>
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/rpc/rpc_generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |