2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[master] cleanup strcat/strcpy

4722.	[cleanup]	Clean up uses of strcpy() and strcat() in favor of
			strlcpy() and strlcat() for safety. [RT #45981]
This commit is contained in:
Evan Hunt
2017-09-13 00:14:37 -07:00
parent 20502f35dd
commit 114f95089c
43 changed files with 194 additions and 162 deletions

View File

@@ -493,7 +493,8 @@ isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) {
sockaddr->type.sunix.sun_len =
(unsigned char)sizeof(sockaddr->type.sunix);
#endif
strcpy(sockaddr->type.sunix.sun_path, path);
strlcpy(sockaddr->type.sunix.sun_path, path,
sizeof(sockaddr->type.sunix.sun_path));
return (ISC_R_SUCCESS);
#else
UNUSED(sockaddr);