1
1

usnic: ensure that the string is NULL-terminated

This was CID 1269666.
Этот коммит содержится в:
Jeff Squyres 2015-02-12 10:59:53 -08:00
родитель 41c6e26a38
Коммит 3b39535ebb

Просмотреть файл

@ -1134,7 +1134,7 @@ int opal_btl_usnic_connectivity_agent_init(void)
memset(&address, 0, sizeof(struct sockaddr_un));
address.sun_family = AF_UNIX;
strncpy(address.sun_path, ipc_filename, sizeof(address.sun_path));
strncpy(address.sun_path, ipc_filename, sizeof(address.sun_path) - 1);
if (bind(ipc_accept_fd, (struct sockaddr *) &address,
sizeof(struct sockaddr_un)) != 0) {