1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Use apr_cpystrn instead of strncpy since strncpy can create an unterminated string.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@727777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Takashi Sato
2008-12-18 17:51:18 +00:00
parent ef9eb34323
commit f2cf8d6e5d

View File

@@ -104,7 +104,7 @@ static apr_status_t get_socket_from_path(apr_pool_t *p,
}
sa.sun_family = AF_UNIX;
strncpy(sa.sun_path, path, sizeof(sa.sun_path));
apr_cpystrn(sa.sun_path, path, sizeof(sa.sun_path));
rv = socket_connect_un(s, &sa);
if (rv) {