mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
more str{n}{cat,cpy} corrections rt45981_stage2
This commit is contained in:
@@ -3946,8 +3946,7 @@ isc__socket_setname(isc_socket_t *socket, const char *name, void *tag) {
|
||||
REQUIRE(VALID_SOCKET(socket));
|
||||
|
||||
LOCK(&socket->lock);
|
||||
memset(socket->name, 0, sizeof(socket->name));
|
||||
strncpy(socket->name, name, sizeof(socket->name) - 1);
|
||||
strlcpy(socket->name, name, sizeof(socket->name));
|
||||
socket->tag = tag;
|
||||
UNLOCK(&socket->lock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user