From 50bf9f5d8403b9903ea63867611ac16ffec1c14c Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 29 Jan 2019 16:58:13 +0100 Subject: Fix bug in ei_accept_tmo --- lib/erl_interface/src/connect/ei_connect.c | 1 - lib/erl_interface/src/misc/ei_portio.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/erl_interface') diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 206b185e96..e8ecb7011f 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -1277,7 +1277,6 @@ int ei_accept_tmo(ei_cnode* ec, int lfd, ErlConnect *conp, unsigned ms) } if (conp) { memcpy((void *) conp->ipadr, (void *) &addr.sin_addr, sizeof(conp->ipadr)); - strcpy(&conp->nodename[0], her_name); } if (cbs->accept_handshake_complete) { diff --git a/lib/erl_interface/src/misc/ei_portio.c b/lib/erl_interface/src/misc/ei_portio.c index 368c56546b..bccc86c1b1 100644 --- a/lib/erl_interface/src/misc/ei_portio.c +++ b/lib/erl_interface/src/misc/ei_portio.c @@ -249,7 +249,7 @@ static int tcp_accept(void **ctx, void *addr, int *len, unsigned unused) if (res) return res; - res = accept(fd, (struct sockaddr*) &addr, &addr_len); + res = accept(fd, (struct sockaddr*) addr, &addr_len); if (MEANS_SOCKET_ERROR(res)) return get_error(); -- cgit v1.2.3