modules: fix strncpy calls to ensure strings are NULL-terminated

This commit is contained in:
Daniel Eklöf 2019-02-06 18:10:06 +01:00
parent 0e3866186f
commit a831490462
2 changed files with 2 additions and 2 deletions

View file

@ -442,7 +442,7 @@ get_socket_address(struct sockaddr_un *addr)
#endif
}
strncpy(addr->sun_path, sway_sock, sizeof(addr->sun_path));
strncpy(addr->sun_path, sway_sock, sizeof(addr->sun_path) - 1);
return true;
}