btl/tcp: fix CID 710596
sizeof(addrs[0].addr_inet)==16 (so that it can handle IPv6 addresses), but the memory that we are copying from (my_ss->sin_addr) is only 4 bytes long. Don't copy beyond the end of that source buffer. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
9de750a280
Коммит
8c419294a8
@ -1184,7 +1184,7 @@ static int mca_btl_tcp_component_exchange(void)
|
||||
(4 != mca_btl_tcp_component.tcp_disable_family)) {
|
||||
memcpy(&addrs[current_addr].addr_inet,
|
||||
&((struct sockaddr_in*)&my_ss)->sin_addr,
|
||||
sizeof(addrs[0].addr_inet));
|
||||
sizeof(struct in_addr));
|
||||
addrs[current_addr].addr_port =
|
||||
mca_btl_tcp_component.tcp_listen_port;
|
||||
addrs[current_addr].addr_family = MCA_BTL_TCP_AF_INET;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user