summaryrefslogtreecommitdiff
path: root/src/rpc_generic.c
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2008-09-16 08:46:29 -0400
committerSteve Dickson <steved@redhat.com>2008-09-16 08:46:29 -0400
commit9e7ba0c7a02031294fefadfbca42b3dd5f2d841f (patch)
tree9eacf5b9a433f5a89a1148dfce6cb5536ffd8d0e /src/rpc_generic.c
parentea9f048761d0b9a2ab6310bffa07351f0b04d8c5 (diff)
downloadti-rpc-9e7ba0c7a02031294fefadfbca42b3dd5f2d841f.tar.gz
Fix for taddr2addr conversion bug of local addresses
When converting af_local socket addresses in taddr2uaddr, an incorrect sizeof() would result in a truncated path string. As a result, rpcbind will report the local /var/lib/rpcbind address to clients as "/v" on a 32bit machine. Signed-off-by: okir@suse.de Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/rpc_generic.c')
-rw-r--r--src/rpc_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc_generic.c b/src/rpc_generic.c
index ff4ba16..b436e3a 100644
--- a/src/rpc_generic.c
+++ b/src/rpc_generic.c
@@ -629,7 +629,7 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
/* if (asprintf(&ret, "%.*s", (int)(sun->sun_len -
offsetof(struct sockaddr_un, sun_path)),
sun->sun_path) < 0)*/
- if (asprintf(&ret, "%.*s", (int)(sizeof(sun) -
+ if (asprintf(&ret, "%.*s", (int)(sizeof(*sun) -
offsetof(struct sockaddr_un, sun_path)),
sun->sun_path) < 0)