Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx> --- tests/unix_socket/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unix_socket/server.c b/tests/unix_socket/server.c index 7cbebe3..f882930 100644 --- a/tests/unix_socket/server.c +++ b/tests/unix_socket/server.c @@ -102,6 +102,7 @@ main(int argc, char **argv) char peerlabel[256]; socklen_t labellen = sizeof(peerlabel); + remotesunlen = sizeof(remotesun); newsock = accept(sock, (struct sockaddr *)&remotesun, &remotesunlen); if (newsock < 0) { @@ -149,7 +150,7 @@ main(int argc, char **argv) memset(&msg, 0, sizeof(msg)); msglabel[0] = 0; msg.msg_name = &remotesun; - msg.msg_namelen = remotesunlen; + msg.msg_namelen = sizeof(remotesun); msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = &control; -- 2.4.3 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.