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>
/* 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)