From cf3e714c3905bcb532c1cb95de72dec311418f5c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 27 Jun 2017 20:06:56 +0300 Subject: Fixed Unix sockaddr processing in nxt_sockaddr_text(). --- src/nxt_sockaddr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/nxt_sockaddr.c') diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 4bfff2b0..70bdfa06 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -245,19 +245,16 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) #if (NXT_HAVE_UNIX_DOMAIN) case AF_UNIX: - - offset = offsetof(nxt_sockaddr_t, u) + sizeof(struct sockaddr_un); + offset = offsetof(nxt_sockaddr_t, u) + sa->socklen; sa->start = offset; sa->address_start = offset; start = nxt_pointer_to(sa, offset); - p = start; + p = (u_char *) sa->u.sockaddr_un.sun_path; #if (NXT_LINUX) - p = (u_char *) sa->u.sockaddr_un.sun_path; - if (p[0] == '\0') { int length; -- cgit